Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > University Math Help > Advanced Probability and Statistics
Reply
 
Thread Tools Display Modes
  #1  
Old June 20th, 2009, 09:03 PM
Newbie
 
Join Date: Jun 2009
Location: Port Jefferson, NY
Posts: 18
Country:
Thanks: 14
Thanked 0 Times in 0 Posts
chrissy72 is on a distinguished road
Default contingency tables

I would really appreciate help on this. Thankyou

A random survey of 100 students (60 boys/40 girls) asked each student to select the most preferred form of recreational activity from 5 choices. Test whether the choice is independent of the gender of the respondent. Approximate the p-value of the test. Would we reject at \alpha=0.05?

Recreational Choice
Basketball (Total=30): Male=21, Female=9
Baseball (Total=8): Male=5, Female=3
Swimming (Total=10): Male=9, Female=1
Running (Total=27): Male=12, Female=15
Tennis (Total=25): Male=13, Female=12

Thankyou!!
Reply With Quote
Advertisement
 
  #2  
Old June 20th, 2009, 10:59 PM
matheagle's Avatar
MHF Contributor
 
Join Date: Feb 2009
Posts: 1,328
Country:
Thanks: 95
Thanked 535 Times in 481 Posts
matheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to behold
Default

Instead of typing this up I did a search because I knew it had to be somewhere in the literature.
It took a dozen links for me to go with
http://homepage.smc.edu/mcgraw_colle...lc%20Notes.pdf
Read the first two pages.
Reply With Quote
The following users thank matheagle for this useful post:
Donate to MHF
  #3  
Old June 20th, 2009, 11:02 PM
Random Variable's Avatar
Senior Member
 
Join Date: May 2009
Posts: 429
Country:
Thanks: 39
Thanked 169 Times in 159 Posts
Random Variable has a spectacular aura aboutRandom Variable has a spectacular aura aboutRandom Variable has a spectacular aura about
Default

Our null hypothesis is that preference is independent of gender.

If preference is indeed independent of gender, we would expect, for example, \frac {30}{100}* 60 = 18 men to prefer basektball and \frac {30}{100} *40 = 12 women to prefer basketball.


EDIT: q = \frac {(21-18)^{2}}{18} + \frac{(9-12)^{2}}{12} + \frac{(5-4.8)^{2}}{4.8} + \frac {(3-3.2)^{2}}{3.2} + \frac{(9-6)^{2}}{6} + \frac{(1-4)^{2}}{4} + + \frac{(12-16.2)^{2}}{16.2} + \frac{(15-10.8)^{2}}{10.8}  + \frac{(13-15)^{2}} {15} + \frac{(12-10)^{2}}{10}

Calculate q.

Q follows a \chi^{2}-distribution with (2-1)(5-1) = 4 degrees of freedom (one less than the number of rows times one less than the number of columns)

The p-value for this test is P(\chi^{2}_{4} \ge q).

This is the smallest significance level at which the null hypothesis can be rejected. So if this value is less than 0.05, then there is enough evidence to reject the null hypothesis.

Last edited by Random Variable; June 20th, 2009 at 11:33 PM. Reason: fixed a couple of errors
Reply With Quote
The Following 2 Users Say Thank You to Random Variable For This Useful Post:
Donate to MHF
  #4  
Old June 20th, 2009, 11:20 PM
matheagle's Avatar
MHF Contributor
 
Join Date: Feb 2009
Posts: 1,328
Country:
Thanks: 95
Thanked 535 Times in 481 Posts
matheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to beholdmatheagle is a splendid one to behold
Default

You can calculate the exact p-value via...
Free p-Value Calculator for the Chi-Square Test
Reply With Quote
The Following 2 Users Say Thank You to matheagle For This Useful Post:
Donate to MHF
  #5  
Old June 27th, 2009, 10:18 AM
Newbie
 
Join Date: Jun 2009
Location: Port Jefferson, NY
Posts: 18
Country:
Thanks: 14
Thanked 0 Times in 0 Posts
chrissy72 is on a distinguished road
Default

I got q=8.309722222 and with 4 degrees of freedom, the calculator gave me 0.038262. This would mean I could reject the null hypothesis. Is there a formula or chart to find the p-value? I'm curious how that number came about. Thanks

Last edited by chrissy72; June 27th, 2009 at 10:31 AM. Reason: To include my answer for q
Reply With Quote
  #6  
Old June 27th, 2009, 10:54 AM
Random Variable's Avatar
Senior Member
 
Join Date: May 2009
Posts: 429
Country:
Thanks: 39
Thanked 169 Times in 159 Posts
Random Variable has a spectacular aura aboutRandom Variable has a spectacular aura aboutRandom Variable has a spectacular aura about
Default

Quote:
Originally Posted by chrissy72 View Post
I got q=8.309722222 and with 4 degrees of freedom, the calculator gave me 0.038262. This would mean I could reject the null hypothesis. Is there a formula or chart to find the p-value? I'm curious how that number came about. Thanks
Are you sure you typed in the correct number? For your calculated q I get 0.080870.


According to the following table, the value is somewhere between 0.05 and 0.10.

Table: Chi-Square Probabilities
Reply With Quote
The following users thank Random Variable for this useful post:
Donate to MHF
  #7  
Old June 27th, 2009, 11:37 AM
Random Variable's Avatar
Senior Member
 
Join Date: May 2009
Posts: 429
Country:
Thanks: 39
Thanked 169 Times in 159 Posts
Random Variable has a spectacular aura aboutRandom Variable has a spectacular aura aboutRandom Variable has a spectacular aura about
Default

To calculate the value yourself, you have to solve the following integral (which is not too bad in this particular case):


\frac {1}{2^{4/2} \Gamma (4/2)} \int^{\infty}_{8.30972} x^{4/2 -1}e^{-x/2} \ dx = \frac {1}{4 \Gamma (2)} \int^{\infty}_{8.30972} xe^{-x/2} \ dx


= \frac {1}{4} \int^{\infty}_{8.30972} xe^{-x/2} \ dx \ (\text{since} \ \Gamma{2} = \Gamma (1+1) = 1 \Gamma(1) = 1*1 = 1 )


= \frac{\text{-}xe^{-x/2}}{2} \Big|^{\infty}_{8.30972} + \frac{1}{2}\int^{\infty}_{8.30972} e^{-x/2} \ dx \ (\text{ integration by parts} )

= \frac {\text{-}xe^{-x/2}}{2} - e^{-x/2} \Big|^{\infty}_{8.30972}

0 - \Big(\frac{\text{-}(8.30972)e^{-8.30972/2}}{2} - e^{-8.30972/2} \Big) \approx 0.08087
Reply With Quote
The following users thank Random Variable for this useful post:
Donate to MHF
  #8  
Old June 27th, 2009, 11:45 AM
Newbie
 
Join Date: Jun 2009
Location: Port Jefferson, NY
Posts: 18
Country:
Thanks: 14
Thanked 0 Times in 0 Posts
chrissy72 is on a distinguished road
Default

Thank you for helping! I typed in 8.30972 as the chi square value and 4 degrees of freedom into the calculator provided by matheagle. Thank you for the formula. I have to do a question very similar to this and don't want to get it all wrong. If your answer is correct (which I'm sure it is), then the null hypothesis that gender that preference is independent of gender is NOT rejected?
Reply With Quote
  #9  
Old June 27th, 2009, 12:29 PM
Random Variable's Avatar
Senior Member
 
Join Date: May 2009
Posts: 429
Country:
Thanks: 39
Thanked 169 Times in 159 Posts
Random Variable has a spectacular aura aboutRandom Variable has a spectacular aura aboutRandom Variable has a spectacular aura about
Default

Quote:
Originally Posted by chrissy72 View Post
Thank you for helping! I typed in 8.30972 as the chi square value and 4 degrees of freedom into the calculator provided by matheagle. Thank you for the formula. I have to do a question very similar to this and don't want to get it all wrong. If your answer is correct (which I'm sure it is), then the null hypothesis that gender that preference is independent of gender is NOT rejected?
When I type those values into that calculator that matheagle provided, I get 0.080870.
Reply With Quote
  #10  
Old June 27th, 2009, 12:33 PM
Random Variable's Avatar
Senior Member
 
Join Date: May 2009
Posts: 429
Country:
Thanks: 39
Thanked 169 Times in 159 Posts
Random Variable has a spectacular aura aboutRandom Variable has a spectacular aura aboutRandom Variable has a spectacular aura about
Default

And you usually don't want to calculate a p-value by integration because the integral is often very difficult. That's why there are tables.
Reply With Quote
  #11  
Old June 27th, 2009, 12:34 PM
Newbie
 
Join Date: Jun 2009
Location: Port Jefferson, NY
Posts: 18
Country:
Thanks: 14
Thanked 0 Times in 0 Posts
chrissy72 is on a distinguished road
Default

You are totally right. I am so sorry. I must have written down the incorrect number. I am getting myself so confused. I have papers everywhere! Thank for everything.
Reply With Quote
  #12  
Old June 27th, 2009, 12:37 PM
Newbie
 
Join Date: Jun 2009
Location: Port Jefferson, NY
Posts: 18
Country:
Thanks: 14
Thanked 0 Times in 0 Posts
chrissy72 is on a distinguished road
Default

since it is over 0.05, it fails to reject the null hypothesis. does this 0.05 just come from \alpha=0.05?
Reply With Quote
  #13  
Old June 27th, 2009, 12:40 PM
Random Variable's Avatar
Senior Member
 
Join Date: May 2009
Posts: 429
Country:
Thanks: 39
Thanked 169 Times in 159 Posts
Random Variable has a spectacular aura aboutRandom Variable has a spectacular aura aboutRandom Variable has a spectacular aura about
Default

Quote:
Originally Posted by chrissy72 View Post
since it is over 0.05, it fails to reject the null hypothesis. does this 0.05 just come from \alpha=0.05?
yes, there is NOT enough evidence to reject the null hypothesis at the \alpha =0.05 significance level

Last edited by Random Variable; June 27th, 2009 at 01:11 PM.
Reply With Quote
The following users thank Random Variable for this useful post:
Donate to MHF
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 10:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.