##### Demonstration Script #2b ##### MATH322 ##### ##### Estimation Example ##### ### The difference of variance example # X1 ~ Normal # X2 ~ Normal # By definition, chisq = sum of Z^2 # # # # So, let's get the endpoints for # the difference in chi-sqares ### Initialize sample sizes # These were given by Nadine. # Thanks, Nadine! n1 = 13 n2 = 75 # Simulation x1 = rchisq(1e5, df=n1-1) x2 = rchisq(1e5, df=n2-1) # A view of the distribution of the difference hist(x1-x2) # This gives the values of a and b quantile( x1-x2, c(0.025,0.975) )