Results 1 to 13 of 13

Math Help - contingency tables

  1. #1
    Newbie
    Joined
    Jun 2009
    From
    Port Jefferson, NY
    Posts
    18

    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!!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    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.
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member Random Variable's Avatar
    Joined
    May 2009
    Posts
    959
    Thanks
    3
    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 09:33 PM. Reason: fixed a couple of errors
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor matheagle's Avatar
    Joined
    Feb 2009
    Posts
    2,763
    Thanks
    5
    You can calculate the exact p-value via...
    Free p-Value Calculator for the Chi-Square Test
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Newbie
    Joined
    Jun 2009
    From
    Port Jefferson, NY
    Posts
    18
    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 08:31 AM. Reason: To include my answer for q
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member Random Variable's Avatar
    Joined
    May 2009
    Posts
    959
    Thanks
    3
    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
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Super Member Random Variable's Avatar
    Joined
    May 2009
    Posts
    959
    Thanks
    3
    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
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Newbie
    Joined
    Jun 2009
    From
    Port Jefferson, NY
    Posts
    18
    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?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Super Member Random Variable's Avatar
    Joined
    May 2009
    Posts
    959
    Thanks
    3
    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.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    Super Member Random Variable's Avatar
    Joined
    May 2009
    Posts
    959
    Thanks
    3
    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.
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Newbie
    Joined
    Jun 2009
    From
    Port Jefferson, NY
    Posts
    18
    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.
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Newbie
    Joined
    Jun 2009
    From
    Port Jefferson, NY
    Posts
    18
    since it is over 0.05, it fails to reject the null hypothesis. does this 0.05 just come from \alpha=0.05?
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Super Member Random Variable's Avatar
    Joined
    May 2009
    Posts
    959
    Thanks
    3
    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 11:11 AM.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. MemberShip Tables
    Posted in the Discrete Math Forum
    Replies: 18
    Last Post: July 17th 2010, 11:32 PM
  2. Tournament Tables
    Posted in the Math Puzzles Forum
    Replies: 1
    Last Post: May 10th 2010, 11:53 AM
  3. Replies: 1
    Last Post: October 13th 2008, 05:14 PM
  4. solving tables
    Posted in the Algebra Forum
    Replies: 1
    Last Post: June 4th 2008, 06:07 PM
  5. function tables
    Posted in the Math Topics Forum
    Replies: 1
    Last Post: September 17th 2005, 06:12 PM

Search Tags


/mathhelpforum @mathhelpforum