What should my parameter be for the chi2pdf?
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I created a histogram for my data which is scaled so i can compare a distribution to it. I compared few distributions and wanted to also compare the chi squared distribution.
I used chi2pdf(100000:1:240000,?). What should be in place of the '?' here. Would i use the mean, as the degrees of freedom represents the expected value if i am not mistaken.
My data is of different number of births for 21 different years, i.e from 1994-2014.
Also my histogram is positively skewed and any ideas on other distributions i can use would be appreciated. I have used the poisson, normal, chi squared and exponential curve, however they have not realy represented my data well.
Thanks in advance.
0 Commenti
Risposte (2)
Star Strider
il 17 Dic 2016
the chi2pdf requires only two parameters, the values you want it calculated, and the degrees of freedom. So you would put the degrees-of-freedom where the ‘?’ is. I invite you to read about the chi-squared distribution to learn what it describes and how best to use it.
Most biomedical data are defined by a lognormal distribution. They are close to normally distributed, but only for positive values of the relevant variables for obvious reasons (unless you’re studying differences). The chi-squared distribution adheres to that criterion, but is chiefly used to compare distributions or patterns in data.
If you are looking at numbers of births in different years, I would plot your data first. Do a Fourier transform (see the documeatation for fft (link)) to see the distribution over time. This may be more informative than a distribution, since most births in humans occur in the late summer.
2 Commenti
Star Strider
il 18 Dic 2016
My guess is that since you’re comparing two different regions, (that is the number of classes k are 2), the degrees of freedom would be k-1 or 1 (or so I gather from just looking this up in Snedecor and Cochran, Statistical Methods, Eighth Edition).
John BG
il 18 Dic 2016
Modificato: John BG
il 18 Dic 2016
the parameter called 'degree of freedom' of a chi-square probability distribution is not the mean value but half the variance.
the variance is the second order statistical moment that under certain circumstances is the square of the standard deviation.
If you want we can review these basics with further detail, or I can give you precise literature references.
John BG
2 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!