173 have at least some hearing loss and count the

Info icon This preview shows pages 189–191. Sign up to view the full content.

= 0.173 have at least some hearing loss and count the number of successes (with hearing loss in the sample): n = 2928, common ࠵? = 0.173 x In R > count1994 = rbinom(1, size = 2928, prob=.173) > count1994 Displays the results x In Minitab Choose Calc > Random Data > Binomial Specify 1 row to generate, Store in column 'count1994' , Number of trials = 2928, and Event probability = 0.173 (You need the single quotation marks around the column name to refer to it directly.) 2. Now simulate (and view) taking a random sample of 1771 teenagers (for the 2006 study) from a population also with S = 0.173 and count the number of successes in this sample. Technology: Repeat the above steps but change the sample size and column/vector name. 3. Calculate (by hand) the difference in the conditional proportions with hearing loss for these two “could have been” samples. [ Hint: How do you do this based on the randomly generated “numbe r of successes” in each sample?] (n) Will everyone in the class get the same answers to (m)? Explain. (o) How does the difference in sample proportions you just generated at random, assuming that the two years have the same population proportion, compare to the observed difference in sample proportions in the actual studies from (e)? SIMILAR FURTHER FROM ZERO CLOSER TO ZERO But to evaluate how unusual such a result is when the null hypothesis is true, we want to generate many more outcomes assuming the null hypothesis to be true.
Image of page 189

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Chance/Rossman, 2015 ISCAM III Investigation 3.1 189 (p) To create the null distribution of the differences in sample proportions, you will generate 1000 random samples from each population and calculate the difference in conditional proportions each time, storing the results in 2 different vectors/columns: Number of random samples = 1000 x In R > phat94 = rbinom(1000, 2928, .173)/2928 Divides number of successes by n > phat06 = rbinom(1000, 1771, .173)/1771 to get sample proportions (X/ n ). > phatdiffs = phat94 - phat06 You now have 1000 differences. x In Minitab Choose Calc > Random Data > Binomial , generate 1000 rows of data and store in 'count1994' with Number of trials 2928 and Event probability .173. Choose Calc > Calculator , store the result in prop1994 , with expression 'count1994'/2928 ( MTB> let c2 = c1/2928 ) Repeat for 2006 data but change the sample size, and store the counts in 'count2006' and the sample proportions in prop2006 . Choose Calc > Calculator , store the result in diff , expression: 'prop1994'-'prop2006' You now have 1000 differences in p ˆ ’s . ( MTB> let c5 = c2 c4 ) (q) Display a histogram and summary statistics of the null distribution of differences in sample proportions: x In R > par(mfrow=c(3,1)) Creates 3 rows in graph window > hist(phat94); hist(phat06) Use a semicolon to separate commands > hist(phatdiffs, labels=T) In RStudio, can zoom the graph window > mean(phat94); mean(phat06) > mean(phatdiffs) > sd(phat94); sd(phat06) > sd(phatdiffs) x In Minitab Choose Graph > Histogram > Simple, OK. Specify 'prop1994' 'prop2006' 'diff' (double click on each in the left panel) in the Graph variables box. Press OK.
Image of page 190
Image of page 191
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern