Presentation is loading. Please wait.

Presentation is loading. Please wait.

How to know when to use them. Which one should I use?

Similar presentations


Presentation on theme: "How to know when to use them. Which one should I use?"— Presentation transcript:

1 How to know when to use them. Which one should I use?

2 Chi Square Tests

3 Chi Square Goodness of Fit Test This test allows us to compare a collection of categorical data with some theoretical expected distribution. Sometimes called a One-Sample Test Degrees of Freedom = categories – one. Example: Birth month of Baseball players

4 Chi Square Goodness of Fit Test After getting trounced by your little brother in a children’s game, you suspect the die he gave you to roll may be unfair. To check, you roll it 60 times, recording the number of times each face appears. Do these results cast doubt on the die’s fairness? If the die is fair, how many times would you expect each face to show? To see if these results are unusual, what type of test will you perform? State your hypotheses FaceCount 111 27 39 415 512 66

5 Chi Square Goodness of Fit Test After getting trounced by your little brother in a children’s game, you suspect the die he gave you to roll may be unfair. To check, you roll it 60 times, recording the number of times each face appears. Do these results cast doubt on the die’s fairness? Check the conditions How many degrees of freedom are there? Find x 2 and the P-value State your conclusion FaceCount 111 27 39 415 512 66

6 Chi Square Test of Homogeneity A test comparing the distribution of counts for two or more groups on the same categorical variable. Finds the expected counts based on the overall frequencies, adjusted for the totals in each group under the (null hypothesis) assumption that the distributions are the same for each group. Degrees of Freedom = (rows – 1)(columns – 1) Where rows gives the number of categories and columns gives the number of independent groups. Example: Future plans of Graduates based on college of study

7 Chi Square Test of Homogeneity Does your doctor know? A survey of articles from the New England Journal of Medicine (NEJM) classified them according to the principal statistics methods used. The articles recorded were all non-editorial articles appearing during the indicated years. Has there been a change in the use of Statistics? What kind of test would be appropriate? State the hypotheses. How many degrees of freedom are there? The smallest expected count will be in 1989/No cell. What is it? Publication Year 1978- 79 1989 2004- 05 Total No Stats 901440144 Stats242101271614 Total332115311758

8 Chi Square Test of Homogeneity Does your doctor know? A survey of articles from the New England Journal of Medicine (NEJM) classified them according to the principal statistics methods used. The articles recorded were all non-editorial articles appearing during the indicated years. Has there been a change in the use of Statistics? Check the assumptions and conditions for inference. Calculate the component of chi- square for the 1989/No cell. For this test, x 2 = 25.28. What’s the P- value? State your conclusion. Publication Year 1978- 79 1989 2004- 05 Total No Stats 901440144 Stats242101271614 Total332115311758

9 Chi Square Test of Homogeneity Does your doctor know? A survey of articles from the New England Journal of Medicine (NEJM) classified them according to the principal statistics methods used. The articles recorded were all non-editorial articles appearing during the indicated years. Has there been a change in the use of Statistics? Show how the residual for the 1989/No cell was calculated. What can you conclude from the patterns in the standardized residuals? Publication Year 1978- 79 1989 2004- 05 No Stats 3.39-1.68-2.48 Stats-1.640.811.20

10 Chi Square Test of Independence A test of whether two categorical variables are independent. Usually displayed in a contingency table. Contingency table – A two-way table that classifies individuals according to two categorical variables. Examines the distribution of counts for one group of individuals classified according to both variables. Degrees of Freedom = (rows – 1)(columns – 1) Where rows give the number of categories in one variable and columns gives the number of categories in the other.

11 Chi Square Test of Independence There is some concern that if a woman has an epidural to reduce pain during childbirth, the drug can get into the baby’s bloodstream, making the baby sleepier and less willing to breastfeed. Researchers followed up on 1178 births, noting whether the mother had an epidural and whether the baby was still nursing after 6 months. What kind of test would be appropriate? State the null and alternative hypotheses. How many degrees of freedom are there? Epidural? Breastfeeding at 6 months? YesNoTotal Yes206498704 No190284474 Total3967821178

12 Chi Square Test of Independence There is some concern that if a woman has an epidural to reduce pain during childbirth, the drug can get into the baby’s bloodstream, making the baby sleepier and less willing to breastfeed. Researchers followed up on 1178 births, noting whether the mother had an epidural and whether the baby was still nursing after 6 months. The smallest expected count will be in the epidural/no breastfeeding cell. What is it? Check the assumptions and conditions for inference. Calculate the component of chi- square for the epidural/no breastfeeding cell. Epidural? Breastfeeding at 6 months? YesNoTotal Yes206498704 No190284474 Total3967821178

13 Chi Square Test of Independence There is some concern that if a woman has an epidural to reduce pain during childbirth, the drug can get into the baby’s bloodstream, making the baby sleepier and less willing to breastfeed. Researchers followed up on 1178 births, noting whether the mother had an epidural and whether the baby was still nursing after 6 months. For this test, x 2 = 14.87. What’s the P- value? State your conclusion. Show how the residual for the epidural/no breastfeeding cell was calculated. What can you conclude from the standardized residuals? Epidural? Breastfeeding at 6 months? YesNo Yes-1.9914.2 No2.43-1.73

14 Chi Square Test of Independence There is some concern that if a woman has an epidural to reduce pain during childbirth, the drug can get into the baby’s bloodstream, making the baby sleepier and less willing to breastfeed. Researchers followed up on 1178 births, noting whether the mother had an epidural and whether the baby was still nursing after 6 months. Suppose a broader study included several additional issues, including whether a mother drank alcohol, whether this was a first child, and whether the parents occasionally supplemented breastfeeding with bottled formula. Why would it not be appropriate to use chi-square methods on the 2 × 8 table with yes/no columns for each potential factor?


Download ppt "How to know when to use them. Which one should I use?"

Similar presentations


Ads by Google