we have run this in R, The R code is
#===========================================================================
#selecting mean and sd
m=0
s=1
chi=rep(0,1000)
for(i in 1:1000)
{
x=rnorm(5,m,s)
chi[i]=sum(((x-m)/s)^2)
}
chisq.test(chi,rchisq(1000,5))
#=====================================================================
the test result is
Pearson's Chi-squared test
data: chi and rchisq(1000, 5)
X-squared = 999000, df = 998000, p-value = 0.2397
since p-value>0.05 we can say that the data will have chi-sq distributed at 95% confidence.
Get Answers For Free
Most questions answered within 1 hours.