Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Math185 hw1


Problem  1.    (Some  poll  data.)       Some  1,644 adults nationwide were asked the following question1: Do you think that the federal government should fund pre-kindergarten programs for all children nationwide, or do you think it should be left to each individual state government to decide?

Responses: federal government (47%) – each state (52%) – unsure/no answer (2%)

A.  The percentages do not sum to 100%. Why?

B.  Produce a bar plot and a pie chart.  (Make them nice, using legends, colors, etc.)

C.  Based on these data, test whether Americans have a preference between ‘federal govern’ and ‘each state’. Formalize this into a hypothesis testing problem and then perform a test. Briefly conclude. What assumptions do your conclusions rely on?

 

 

Problem 2.   (Accuracy of the chi-squared approximation.)    We saw in lecture that the distribution of the likelihood ratio for testing against a null distribution with S possible values is asymptotically chi-squared with S _ 1 degrees of freedom under the null hypothesis. How accurate is this approximation in finite samples?

To probe into this question, we perform some numerical experiments. Draw n observations from the uniform distribution on (1, . . . , S} and compute the likelihood ratio statistic. Repeat M = 104 times, obtaining realizations of the likelihood ratio denoted L1, . . . , LM . Draw a histogram of these values.  [Use the function hist, set the number of bins to 100, and plot proportions (as opposed to frequencies).]  Overlay the density for the chi-squared distribution we are comparing to.  Do this for S e (5, 10, 20, 50} and n e (10, 20, 50, 100, 200, 500, 1000, 2000, 5000}.  For each S, display the result as a 3-by-3 panel plot (make it nice). Offer some comments.

 



Problem 3.  (School admissions.)   Consider the following dataset. Those are admission results to magnet school programs2  in Houston in 2003.

A. Explore the data with summary statistics and graphics. Offer some brief comments/observations. Produce a contingency table.

B. Is there an association between Admission and Ethnicity?  Formalize this into a hypothesis testing problem and produce a test. Make sure you conclude (but briefly).