How to define a skewed normal distribution using mode and two points? I want to define a Gaussian distribution function and plot it in python using the mode and inflection points parameter values instead of using the mean and standard deviation.
For example, I have mode=110 and two points : (40, 160) for asymmetrical points.
Or mode=100 and two points = (50,150) for symmetrical points.
I tried with this code below, but I don't how I can add the second point to the formula which is returned by the function? Since I have two points, and I don't know how to define a function that depends on two points and mode. Thanks in advance for your help!
import numpy as np
matplotlib.pyplot as plt   
def gaussian(x, mode, inf_point):
    return 1/(np.sqrt(2*np.pi)*inf_point)*np.exp(-np.power((x - mode)/inf_point, 2)/2)
x = np.linspace(0,256)
plt.plot(x, gaussian(x, mode, inf_point))

 A: The following might work for the case explained in the comments.
Given some data, skewnorm.fit will try to find parameters for skewnorm that fit the data. Such a fit needs good initial parameters.  Some experimenting suggests that when the skewness parameter is initialized with zero, the resulting fit also has a skewness close to zero.  Setting the initial skewness parameter rather high, e.g. 10, seems to generate a fit much closer to the real skewness used for the test data.
The following code first generates some dummy data and draws its histogram and kde. Then a skewnorm is fitted to the data, and the pdf of that fit is drawn on the same plot.
from matplotlib import pyplot as plt
import seaborn as sns
import numpy as np
from scipy.stats import skewnorm

# create some random data from a skewnorm
data = skewnorm.rvs(3, loc=90, scale=50, size=1000).astype(np.int)

# draw a histogram and kde of the given data
ax = sns.distplot(data, kde_kws={'label':'kde of given data'}, label='histogram')

# find parameters to fit a skewnorm to the data
params = skewnorm.fit(data, 10, loc=80, scale=40)

# draw the pdf of the fitted skewnorm
x = np.linspace(0, 255, 500)
ax.plot(x, skewnorm.pdf(x, *params), label='approximated skewnorm')
plt.legend()
plt.show()


