I have a serie of data ranging between [0,1]. I'm trying to fit this data using beta distributions. Given an extra point, between the same range, I would like to obtain a significance respect to the distribution. In a normal distrbution, I would apply a two tailed test. But I'm not sure if this same approach could be applied to this kind of distributions. This is what i tried in python:
I took the idea of the calculation of the p-value from this post: P-value in a two-tail test with asymmetric null distribution.
Maybe I misunderstood it, so any help would be greatly appreciated. Thanks to the community.
EDIT: In order to clarify what I need, I'm gonna show another example: let's generate a random beta distributed data:
from scipy.stats import beta data=beta.rvs(10,4,loc=0,scale=1,size=200) mean=numpy.mean(data) var=numpy.var(data,ddof=1) alpha1=mean**2*(1-mean)/var-mean beta1=alpha1*(1-mean)/mean plt.hist(data,bins=30,normed=True) pdf=lambda x,a,b:gammaf(a+b)/gammaf(a)/gammaf(b)*x**(a-1)*(1-x)**(b-1) aux=numpy.linspace(0,max(data),len(data)) plt.plot(aux,pdf(xx,alpha1,beta1),'r')
We obtain the following plot:
I would like to know whether my point of interest is greater or less than my beta distributed values. If the point tested falls into either of the critical areas of the curve.
Thanks again for your time.