Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Test Goodness of Fit, Test of Independence and Test Homogeneity - Lab | MATH 1530, Lab Reports of Statistics

Material Type: Lab; Professor: Price; Class: Prob/Stats-Noncalculus; Subject: Mathematics (MATH); University: East Tennessee State University; Term: Spring 2010;

Typology: Lab Reports

Pre 2010

Uploaded on 08/13/2009

koofers-user-za8
koofers-user-za8 🇺🇸

10 documents

1 / 6

Toggle sidebar

Related documents


Partial preview of the text

Download Test Goodness of Fit, Test of Independence and Test Homogeneity - Lab | MATH 1530 and more Lab Reports Statistics in PDF only on Docsity! Name_____________________________ Lab: Test goodness of fit, test of independence and test of homogeneity. The three tests below compare observed counts in a table (for categorical or categorized variables) with expected counts obtained under the null hypothesis Test of goodness of fit Ho: a certain model is true Test of independence Ho: two categorical (or categorized) variables are independent Test of homogeneity Ho: two groups have similar behavior with respect to a categorical variable The formula that compares the observed and expected counts is    cellsAll Exp ExpObs 22 )( The value of the statistic 2 is located in the Chi-square distribution and the area (‘p-value’) to the right of that value is calculated. If the p-value is small (smaller than  ) we reject the null hypothesis and conclude that the model is not true (or that the variables are not independent. Goodness of fit test. Is the die fair? Ho: the die is fair In this case ‘the model’ says that each number (from 1 to 6) in the die has the same probability of showing up. You roll the die 60 times obtaining the following results. Write the ‘expected values’ under the null hypotheses: Face 1 2 3 4 5 6 Count 11 7 9 15 12 6 Expected count Calculate the value of the statistic 2 2 = Use Minitab to conduct this test: Enter the observed counts in C1. I’ve named C1 counts. Select Stat > Tables > Chi-Square Goodness-of-Fit Test (One Variable): and fill-in the dialog box as shown below. Chi-Square Goodness-of-Fit Test for Observed Counts in Variable: counts Test Contribution Category Observed Proportion Expected to Chi-Sq 1 11 0.166667 10 0.1 2 7 0.166667 10 0.9 3 9 0.166667 10 0.1 4 15 0.166667 10 2.5 5 12 0.166667 10 0.4 6 6 0.166667 10 1.6 N DF Chi-Sq P-Value 60 5 5.6 0.347 Do you reject the null hypothesis H0? YES NO Do you have evidence that the die is not fair? YES NO Test of Independence. Was survival in the Titanic independent of gender? Female Male Total Alive 343 367 710 Dead 127 1364 1491 470 1731 2201 Ho: Survival was independent of gender How to find the expected values? If survival was independent of gender P(alive and female) =P(alive) P(female) So the expected value of ‘alive and female’ would be 2201*P(alive)*P(female)= 2201* 2201 710 * 2201 470 = 2201 470*710 so an easy way of calculating the expected values is to calculate : (total of row)*(total of column)/(total) That needs to be done for each cell Your worksheet can look like the following Use STAT>TABLES>CROSS TABULATION AND CHI-SQUARE Click the Chi-Square button and check Chi-Square analysis and Expected cell counts. 2. A random survey of autos parked in student and staff lots at a large university classified the brands by country of origin, as seen in the table. Are there differences in the national origins of cars driven by students and staff? Driver Origin Student Staff American 107 105 European 33 12 Asian 55 47 Write the null hypothesis Ho: ___________________________________________________ Use Minitab to find: 2 = p-value= Do you reject the null hypothesis? YES NO Are there differences in the national origins of cars driven by students and staff? YES NO 3. A 1992 poll conducted by the University of Montana classified respondents by gender and political party, as shown in the table. We wonder if there is evidence of an association between gender and party affilation. Democrat Republican Independent Male 36 45 24 Female 48 33 16 Write the null hypothesis Ho: _____________________________________________________ Use Minitab to find: 2 = p-value= Do you reject the null hypothesis? YES NO Is there evidence of an association between gender and party affiliation in Montana? YES NO 4. Some people believe that a full moon elicits unusual behavior in people. The table shows the number of arrests made in a small town during weeks of six full moons and six other randomly selected weeks during the same year. We wonder if there is evidence of a difference in the types of illegal activity that takes place. Offense Full Moon Not Full Violent (murder, assault, rape, etc) 2 3 Property (burglary, vandalism, etc) 17 21 Drugs/Alcohol 27 19 Domestic Abuse 11 14 Other offenses 9 6 Write the null hypothesis Ho: ____________________________________________________________ Try to solve the problem using Minitab. What problem do you encounter? (The Chi-square is not reliable when some of the expected values are below 5) ______________________________________________________________________ To solve this type of problem we ‘collapse the table’, i.e. we put together some of the categories so that the counts become larger. Of course the combination of categories has to make sense. In this example put together the two categories that clearly involve aggressiveness (violent and domestic abuse) and perform the test considering only the 4 new categories and the two phases of the moon (full and not full). Use Minitab to find : 2 = p-value= Do you reject the null hypothesis? YES NO Is there evidence of a difference in the types of illegal activity that takes place when there is full moon and when there is not? YES NO
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved