Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use R/RStudio to generate an i.i.d. sample of size 1000 from the binomial distribution with parameters n = 5 and p = 0.4. Record the
Use R/RStudio to generate an i.i.d. sample of size 1000 from the binomial distribution with parameters n = 5 and p = 0.4. Record the counts in the categories 0, 1, 2, 3, 4, and 5. Now fit the binomial model to your sample. That is, pretend you didn't know that p was 0.4, and fit the best binomial you can from your data. Do the 2 test. Explain the degrees of freedom that should be used, and explain any discrepancy in what you see in your R output. Get the p-value and state the conclusion of your test. Repeat the sampling in the previous problem 2000 times. That is, generate 2000 independent samples, each of size 1000, from the binomial distribution with n = 5 and p = 0.4. For each of your samples, get the counts in each category 0, 1, 2, 3, 4, and 5. Now fit the best binomial to each of your samples, pretending that you didn't know that p = 0.4. For each sample, compute X = 2 log = 2Oi log(Oi/Ei) as well as its approximation Y = (Oi Ei)2/Ei. Draw the empirical (i.e. observed ) histograms of X and Y . Superimpose the appropriate 2 curve over each histogram
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started