document.write( "Question 1132663: A surprising number of people are scared of clowns. You expect that people will have more nightmares the night that they see clowns at the circus. To test this, you send a group of people to a circus with clowns, and a group to a circus without clowns, and measure the number of people in each group who have nightmares that night. Your data is shown below:\r
\n" ); document.write( "\n" ); document.write( " Nightmares Nice dreams
\n" ); document.write( "No clowns 12 35
\n" ); document.write( "Clowns 30 8
\n" ); document.write( "Perform a Z-test on nightmares after the no-clown circus minus nightmares after the clown circus. Report the test statistic.\r
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "

Algebra.Com's Answer #749792 by stanbon(75887)\"\" \"About 
You can put this solution on YOUR website!
Your data is shown below:
\n" ); document.write( "..........Nightmares Nice dreams
\n" ); document.write( "No clowns 12 35
\n" ); document.write( "Clowns 30 8
\n" ); document.write( "---
\n" ); document.write( "p1 = 12/47
\n" ); document.write( "p2 = 30/38
\n" ); document.write( "----
\n" ); document.write( "Perform a Z-test on nightmares after the no-clown circus minus nightmares after the clown circus. Report the test statistic.
\n" ); document.write( "---
\n" ); document.write( "Ho:: p1-p2 = 0
\n" ); document.write( "Ha:: p1-p2 # 0
\n" ); document.write( "-----
\n" ); document.write( "Sample difference:: 12/47-30/38 = -0.534
\n" ); document.write( "Standard deviation = sqrt[(12/47)(25/47)/47 + (30/38)(8/38)/38]
\n" ); document.write( "= sqrt[0.0029+0.0044] = 0.0853
\n" ); document.write( "---
\n" ); document.write( "Test Statistic:: z(-0.534) = -0.523/0.0853 = -6.132
\n" ); document.write( "----\r
\n" ); document.write( "\n" ); document.write( "Cheers,
\n" ); document.write( "Stan H.
\n" ); document.write( "
\n" );