Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007.

Slides:



Advertisements
Similar presentations
Hypothesis Testing. To define a statistical Test we 1.Choose a statistic (called the test statistic) 2.Divide the range of possible values for the test.
Advertisements

Chi-square test Chi-square test or  2 test. Chi-square test countsUsed to test the counts of categorical data ThreeThree types –Goodness of fit (univariate)
Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
Chi-Squared Hypothesis Testing Using One-Way and Two-Way Frequency Tables of Categorical Variables.
Hypothesis Testing IV Chi Square.
Statistical Inference for Frequency Data Chapter 16.
Chapter 13: The Chi-Square Test
Chapter 11 Chi-Square Procedures 11.1 Chi-Square Goodness of Fit.
LARGE SAMPLE TESTS ON PROPORTIONS
Copyright (c) 2004 Brooks/Cole, a division of Thomson Learning, Inc. Chapter 14 Goodness-of-Fit Tests and Categorical Data Analysis.
Definitions In statistics, a hypothesis is a claim or statement about a property of a population. A hypothesis test is a standard procedure for testing.
Goodness of Fit Test for Proportions of Multinomial Population Chi-square distribution Hypotheses test/Goodness of fit test.
Chapter 13 Chi-Square Tests. The chi-square test for Goodness of Fit allows us to determine whether a specified population distribution seems valid. The.
Testing Distributions Section Starter Elite distance runners are thinner than the rest of us. Skinfold thickness, which indirectly measures.
CJ 526 Statistical Analysis in Criminal Justice
Chapter 11: Applications of Chi-Square. Count or Frequency Data Many problems for which the data is categorized and the results shown by way of counts.
Copyright © 2010, 2007, 2004 Pearson Education, Inc. 1.. Section 11-2 Goodness of Fit.
Multinomial Experiments Goodness of Fit Tests We have just seen an example of comparing two proportions. For that analysis, we used the normal distribution.
Chapter 26 Chi-Square Testing
Chi-Square Procedures Chi-Square Test for Goodness of Fit, Independence of Variables, and Homogeneity of Proportions.
Testing Hypotheses about a Population Proportion Lecture 30 Sections 9.3 Wed, Oct 24, 2007.
Section 8-5 Testing a Claim about a Mean: σ Not Known.
Chapter 14: Chi-Square Procedures – Test for Goodness of Fit.
Test of Homogeneity Lecture 45 Section 14.4 Wed, Apr 19, 2006.
Test of Goodness of Fit Lecture 43 Section 14.1 – 14.3 Fri, Apr 8, 2005.
Test of Independence Lecture 43 Section 14.5 Mon, Apr 23, 2007.
Chapter Outline Goodness of Fit test Test of Independence.
Chapter 11: Chi-Square  Chi-Square as a Statistical Test  Statistical Independence  Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
Dan Piett STAT West Virginia University Lecture 12.
Testing Hypotheses about a Population Proportion Lecture 29 Sections 9.1 – 9.3 Fri, Nov 12, 2004.
Testing Hypotheses about a Population Proportion Lecture 29 Sections 9.1 – 9.3 Wed, Nov 1, 2006.
Section 12.2: Tests for Homogeneity and Independence in a Two-Way Table.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 11 Analyzing the Association Between Categorical Variables Section 11.2 Testing Categorical.
Chapter 14 Chi-Square Tests.  Hypothesis testing procedures for nominal variables (whose values are categories)  Focus on the number of people in different.
Statistics 300: Elementary Statistics Section 11-2.
Testing Hypotheses about a Population Proportion Lecture 31 Sections 9.1 – 9.3 Wed, Mar 22, 2006.
Test of Homogeneity Lecture 45 Section 14.4 Tue, Apr 12, 2005.
Chapter 13- Inference For Tables: Chi-square Procedures Section Test for goodness of fit Section Inference for Two-Way tables Presented By:
Section 8-6 Testing a Claim about a Standard Deviation or Variance.
Chapter 14 – 1 Chi-Square Chi-Square as a Statistical Test Statistical Independence Hypothesis Testing with Chi-Square The Assumptions Stating the Research.
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 12 Tests of Goodness of Fit and Independence n Goodness of Fit Test: A Multinomial.
Chi-Square Goodness of Fit Test. In general, the chi-square test statistic is of the form If the computed test statistic is large, then the observed and.
Chapter 11 Chi-Square Procedures 11.1 Chi-Square Goodness of Fit.
Chi Square Procedures Chapter 14. Chi-Square Goodness-of-Fit Tests Section 14.1.
Confidence Interval Estimation for a Population Proportion Lecture 33 Section 9.4 Mon, Nov 7, 2005.
CHI SQUARE DISTRIBUTION. The Chi-Square (  2 ) Distribution The chi-square distribution is the probability distribution of the sum of several independent,
Chi Square Chi square is employed to test the difference between an actual sample and another hypothetical or previously established distribution such.
Student’s t Distribution Lecture 32 Section 10.2 Fri, Nov 10, 2006.
Independent Samples: Comparing Means Lecture 39 Section 11.4 Fri, Apr 1, 2005.
Student’s t Distribution
Student’s t Distribution
Chapter 12 Tests with Qualitative Data
Hypothesis Tests for a Population Mean,
Chapter 10 Analyzing the Association Between Categorical Variables
Lecture 36 Section 14.1 – 14.3 Mon, Nov 27, 2006
Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007
Lecture 42 Section 14.4 Wed, Apr 17, 2007
Lecture 37 Section 14.4 Wed, Nov 29, 2006
Lecture 38 Section 14.5 Mon, Dec 4, 2006
Analyzing the Association Between Categorical Variables
Lecture 43 Sections 14.4 – 14.5 Mon, Nov 26, 2007
Testing Hypotheses about a Population Proportion
Testing Hypotheses about a Population Proportion
Testing Hypotheses about a Population Proportion
Chapter Outline Goodness of Fit test Test of Independence.
Lecture 42 Section 14.3 Mon, Nov 19, 2007
Testing Hypotheses about a Population Proportion
Lecture 46 Section 14.5 Wed, Apr 13, 2005
Lecture 43 Section 14.1 – 14.3 Mon, Nov 28, 2005
Presentation transcript:

Test of Goodness of Fit Lecture 41 Section 14.1 – 14.3 Wed, Nov 14, 2007

Count Data Count data – Data that counts the number of observations that fall into each of several categories.

Count Data The data may be univariate or bivariate. Univariate example – Observe a person’s opinion on a subject (strongly agree, agree, etc.). Bivariate example – Observe a opinion on a subject and their education level (< high school, high school, etc.)

Univariate Example Observe a person’s opinion on a question. Strongly Agree AgreeNeutralDisagree Strongly Disagree

Bivariate Example Observe each person’s opinion and education level. Strongly Agree AgreeNeutralDisagree Strongly Disagree < High School High School College > College 15 20

The Two Basic Questions For univariate data, do the data fit a specified distribution? For example, could these data have come from a uniform distribution? Strongly Agree AgreeNeutralDisagree Strongly Disagree

The Two Basic Questions For bivariate data, for the various values of one of the variables, does the other variable show the same distribution? Could each row have come from the same distribution? Strongly Agree AgreeNeutralDisagree Strongly Disagree < High School High School College > College 15 20

Observed and Expected Counts Observed counts – The counts that were actually observed in the sample. Expected counts – The counts that would be expected if the null hypothesis were true.

Tests of Goodness of Fit The goodness-of-fit test applies only to univariate data. The null hypothesis specifies a discrete distribution for the population. We want to determine whether a sample from that population supports this hypothesis.

Examples If we rolled a die 60 times, we expect 10 of each number.  If we get frequencies 8, 10, 14, 12, 9, 7, does that indicate that the die is not fair? What is the distribution if the die were fair?

Examples If we toss a fair coin, we should get two heads ¼ of the time, two tails ¼ of the time, and one of each ½ of the time.  Suppose we toss a coin 100 times and get two heads 16 times, two tails 36 times, and one of each 48 times. Is the coin fair?

Examples If we selected 20 people from a group that was 60% male and 40% female, we would expect to get 12 males and 8 females.  If we got 15 males and 5 females, would that indicate that our selection procedure was not random (i.e., discriminatory)?  What if we selected 100 people from the group and got 75 males and 25 females?

Null Hypothesis The null hypothesis specifies the probability (or proportion) for each category. Each probability is the probability that a random observation would fall into that category.

Null Hypothesis To test a die for fairness, the null hypothesis would be H 0 : p 1 = 1/6, p 2 = 1/6, …, p 6 = 1/6. The alternative hypothesis will always be a simple negation of H 0 : H 1 : At least one of the probabilities is not 1/6. or more simply, H 1 : H 0 is false.

Level of Significance Let  = The test statistic will involve the expected counts.

Expected Counts To find the expected counts, we apply the hypothetical probabilities to the sample size. For example, if the hypothetical probabilities are 1/6 and the sample size is 60, then the expected counts are (1/6)  60 = 10.

Example The test statistic will be the  2 statistic. Make a chart showing both the observed and expected counts (in parentheses) (10) 10 (10) 14 (10) 12 (10) 9 (10) 7 (10)

The Chi-Square Statistic Denote the observed counts by O and the expected counts by E. Define the chi-square (  2 ) statistic to be

The Chi-Square Statistic Clearly, if all of the deviations O – E are small, then  2 will be small. But if even a few the deviations O – E are large, then  2 will be large.

The Value of the Test Statistic Now calculate  2.

Compute the p-Value To compute the p-value of the test statistic, we need to know more about the distribution of  2.

Chi-Square Degrees of Freedom The chi-square distribution has an associated degrees of freedom, just like the t distribution. Each chi-square distribution has a slightly different shape, depending on the number of degrees of freedom. In this test, df is one less than the number of cells.

Chi-Square Degrees of Freedom

 2 (2)

Chi-Square Degrees of Freedom  2 (2)  2 (5)

Chi-Square Degrees of Freedom  2 (2)  2 (5)  2 (10)

Properties of  2 The chi-square distribution with df degrees of freedom has the following properties.   2  0.  It is unimodal.  It is skewed right (not symmetric!)    2 = df.    2 =  (2df).

Properties of  2 If df is large, then  2 (df) is approximately normal with mean df and standard deviation  (2df).

Chi-Square vs. Normal

 2 (128)

Chi-Square vs. Normal  2 (128) N(128, 16)

TI-83 – Chi-Square Probabilities To find a chi-square probability (p-value) on the TI-83,  Press DISTR.  Select  2 cdf (item #7).  Press ENTER.  Enter the lower endpoint, the upper endpoint, and the degrees of freedom.  Press ENTER.  The probability appears.

Computing the p-value The number of degrees of freedom is 1 less than the number of categories in the table. In this example, df = 5. To find the p-value, use the TI-83 to calculate the probability that  2 (5) would be at least as large as 3.4. p-value =  2 cdf(3.4, E99, 5) = Therefore, p-value = (accept H 0 ).