Chapter 10: Chi-Square and F Distributions

Similar documents
Example. χ 2 = Continued on the next page. All cells

Lecture 28 Chi-Square Analysis

Chapter 10. Chapter 10. Multinomial Experiments and. Multinomial Experiments and Contingency Tables. Contingency Tables.

11-2 Multinomial Experiment

Chapter 26: Comparing Counts (Chi Square)

ANOVA - analysis of variance - used to compare the means of several populations.

Contingency Tables. Contingency tables are used when we want to looking at two (or more) factors. Each factor might have two more or levels.

Statistical methods for comparing multiple groups. Lecture 7: ANOVA. ANOVA: Definition. ANOVA: Concepts

χ test statistics of 2.5? χ we see that: χ indicate agreement between the two sets of frequencies.

Department of Economics. Business Statistics. Chapter 12 Chi-square test of independence & Analysis of Variance ECON 509. Dr.

STAT 135 Lab 11 Tests for Categorical Data (Fisher s Exact test, χ 2 tests for Homogeneity and Independence) and Linear Regression

Chapters 9 and 10. Review for Exam. Chapter 9. Correlation and Regression. Overview. Paired Data

Chapter 8 Student Lecture Notes 8-1. Department of Economics. Business Statistics. Chapter 12 Chi-square test of independence & Analysis of Variance

CHAPTER 13: F PROBABILITY DISTRIBUTION

We know from STAT.1030 that the relevant test statistic for equality of proportions is:

:the actual population proportion are equal to the hypothesized sample proportions 2. H a

Review. One-way ANOVA, I. What s coming up. Multiple comparisons

Statistics for Managers Using Microsoft Excel

AMS7: WEEK 7. CLASS 1. More on Hypothesis Testing Monday May 11th, 2015

Ch. 7: Estimates and Sample Sizes

Mathematical Notation Math Introduction to Applied Statistics

Summary of Chapter 7 (Sections ) and Chapter 8 (Section 8.1)

Contingency Tables. Safety equipment in use Fatal Non-fatal Total. None 1, , ,128 Seat belt , ,878

Chapter Seven: Multi-Sample Methods 1/52

CHAPTER 17 CHI-SQUARE AND OTHER NONPARAMETRIC TESTS FROM: PAGANO, R. R. (2007)

While you wait: Enter the following in your calculator. Find the mean and sample variation of each group. Bluman, Chapter 12 1

Class 24. Daniel B. Rowe, Ph.D. Department of Mathematics, Statistics, and Computer Science. Marquette University MATH 1700

Lecture 5: ANOVA and Correlation

STAT Chapter 13: Categorical Data. Recall we have studied binomial data, in which each trial falls into one of 2 categories (success/failure).

An Analysis of College Algebra Exam Scores December 14, James D Jones Math Section 01

Chi-Squared Tests. Semester 1. Chi-Squared Tests

Lecture 9. Selected material from: Ch. 12 The analysis of categorical data and goodness of fit tests

The t-statistic. Student s t Test

Module 03 Lecture 14 Inferential Statistics ANOVA and TOI

Basic Business Statistics, 10/e

13.1 Categorical Data and the Multinomial Experiment

Lecture 41 Sections Wed, Nov 12, 2008

Goodness of Fit Tests

CHAPTER 13: F PROBABILITY DISTRIBUTION

Introduction to Statistical Data Analysis Lecture 7: The Chi-Square Distribution

10: Crosstabs & Independent Proportions

INTRODUCTION TO ANALYSIS OF VARIANCE

Review for Final. Chapter 1 Type of studies: anecdotal, observational, experimental Random sampling

Disadvantages of using many pooled t procedures. The sampling distribution of the sample means. The variability between the sample means

The goodness-of-fit test Having discussed how to make comparisons between two proportions, we now consider comparisons of multiple proportions.

Psych 230. Psychological Measurement and Statistics

Sociology 6Z03 Review II

THE ROYAL STATISTICAL SOCIETY HIGHER CERTIFICATE

Hypothesis testing. Data to decisions

Chapter 9. Inferences from Two Samples. Objective. Notation. Section 9.2. Definition. Notation. q = 1 p. Inferences About Two Proportions

4. Suppose that we roll two die and let X be equal to the maximum of the two rolls. Find P (X {1, 3, 5}) and draw the PMF for X.

Section 9.5. Testing the Difference Between Two Variances. Bluman, Chapter 9 1

Two-Sample Inferential Statistics

Review of Multiple Regression

Chapter 9: Inferences from Two Samples. Section Title Pages

Parametric versus Nonparametric Statistics-when to use them and which is more powerful? Dr Mahmoud Alhussami

Confidence Intervals, Testing and ANOVA Summary

Statistics Introductory Correlation

15: CHI SQUARED TESTS

Lecture Slides. Section 13-1 Overview. Elementary Statistics Tenth Edition. Chapter 13 Nonparametric Statistics. by Mario F.

Lecture 7: Hypothesis Testing and ANOVA

Lecture 41 Sections Mon, Apr 7, 2008

Chi Square Analysis M&M Statistics. Name Period Date

Section 4.6 Simple Linear Regression

HYPOTHESIS TESTING: THE CHI-SQUARE STATISTIC

STAT 135 Lab 6 Duality of Hypothesis Testing and Confidence Intervals, GLRT, Pearson χ 2 Tests and Q-Q plots. March 8, 2015

CHAPTER 10 ONE-WAY ANALYSIS OF VARIANCE. It would be very unusual for all the research one might conduct to be restricted to

Hypothesis Testing: Chi-Square Test 1

10/31/2012. One-Way ANOVA F-test

The Chi-Square Distributions

Hypothesis testing: Steps

Data Analysis and Statistical Methods Statistics 651

Difference between means - t-test /25

GROUPED DATA E.G. FOR SAMPLE OF RAW DATA (E.G. 4, 12, 7, 5, MEAN G x / n STANDARD DEVIATION MEDIAN AND QUARTILES STANDARD DEVIATION

Inferential statistics

One-Way ANOVA. Some examples of when ANOVA would be appropriate include:

CHI SQUARE ANALYSIS 8/18/2011 HYPOTHESIS TESTS SO FAR PARAMETRIC VS. NON-PARAMETRIC

Lecture Slides. Elementary Statistics. by Mario F. Triola. and the Triola Statistics Series

Your schedule of coming weeks. One-way ANOVA, II. Review from last time. Review from last time /22/2004. Create ANOVA table

CIVL /8904 T R A F F I C F L O W T H E O R Y L E C T U R E - 8

Chi-square (χ 2 ) Tests

Ling 289 Contingency Table Statistics

z and t tests for the mean of a normal distribution Confidence intervals for the mean Binomial tests

Testing Independence

Chapter 8. The analysis of count data. This is page 236 Printer: Opaque this

This gives us an upper and lower bound that capture our population mean.

hypotheses. P-value Test for a 2 Sample z-test (Large Independent Samples) n > 30 P-value Test for a 2 Sample t-test (Small Samples) n < 30 Identify α

Statistical Analysis for QBIC Genetics Adapted by Ellen G. Dow 2017

16.400/453J Human Factors Engineering. Design of Experiments II

Statistics Handbook. All statistical tables were computed by the author.

Chi-square (χ 2 ) Tests

The Difference in Proportions Test

Lecture 45 Sections Wed, Nov 19, 2008

Ch. 7 Statistical Intervals Based on a Single Sample

Sampling Distributions: Central Limit Theorem

PS5: Two Variable Statistics LT3: Linear regression LT4: The test of independence.

Difference in two or more average scores in different groups

Math 2000 Practice Final Exam: Homework problems to review. Problem numbers

REVIEW 8/2/2017 陈芳华东师大英语系

PLSC PRACTICE TEST ONE

Transcription:

Chapter 10: Chi-Square and F Distributions Chapter Notes 1 Chi-Square: Tests of Independence 2 4 & of Homogeneity 2 Chi-Square: Goodness of Fit 5 6 3 Testing & Estimating a Single Variance 7 10 or Standard Deviation 5 One-Way ANOVA: Comparing Several 11 13 Sample Means Y. Butterworth Chapter 10 M10 F10 1

10.1 Chi Square: Tests of Independence & Homogeneity This section and the next will deal with qualitative data. This first section will deal with 2 way tables row and columns are used to classify 2 characteristics of the data. Our two goals will be to see if the row and column data is independent or to see if different populations have different characteristics (for instance men vs. women; homogeneity). First, let s discuss a new distribution the Chi-Squared distribution. Symbolically we will use χ 2 for this distribution. The Chi-Squared distribution is a skewed distribution which has only positive values. It is a right-skewed distribution. It becomes more symmetric as the sample size, which is what determines the degrees of freedom, increases. For the tests of independence and homogeneity we will be considering right-tailed χ 2 tests. The following a picture representing the distribution. Rejection Region 0 χ 2 α,df Focus #1 Independence Assumptions 1. Random sample 2. Row and column variables are independent under the null and dependent under the alternative hypotheses 3. Expected frequency is 5 (observed can be anything) Goal of a Test of Independence See if the rows and columns are dependent. If they are then finding probabilities is just as we discussed in 4.2 when finding probabilities from a contingency table! Philosophy Behind the Test The closer the observed and expected are the smaller the squared deviations and thus the smaller the test statistic. In a Chi-Squared distribution, smaller values are further to the left and thus have larger probabilities (p-values). As such, we see that we need a right tailed test to reject when we have a large difference between observed and expected and thus are seeing dependence. Recall that the probability for independent random variables is what we are testing the observed on, so if there is a large difference then we can make the assumption that they are dependent random variables! Hypotheses H 0 : Rows & Columns are independent H Aor1 : Rows & Columns are dependent (not independent) Y. Butterworth Chapter 10 M10 F10 2

Critical Value χ 2 α, (r 1)(c 1) with confidence level 1 α and d.f. (#rows 1)(#columns 1) Test Statistic χ 2 Σ = (O E) 2 E Rejection Region χ 2 α,(r 1)(c 1) Notation Used for Test Statistic O Observed values in frequency distribution (always whole numbers) E Expected values (row total)(column total) (not necessary a whole #) grand total This is the probability under the assumption of independence. Recall our study in 4.2. If we can make the assumption of independence, which we generally can not in a two way table, then this is the expected value. r The number of rows c The number of columns Reject H 0 for a p-value less than alpha. or a critical value < test statistic Using the TI-83/84 Input 1) Find the expected values 2) Enter Observed values in a Matrix A (Matrix Edit r x c) a) Enter the observed counts 3) Set up Matrix B as a r x c to accept the Expected Matrix 4) STAT TESTS χ 2 Expected: MatrixA(Get by MATRIX NAMES) & Observed: Matrix B(Get by MATRIX NAMES) Calculate Enter Output 1) Test Statistic 2) P-Value of the test statistic 3) Degrees of Freedom (r 1)(c 1) 4) In Matrix B you will find each expected value should you need those. [The (row x column) grand] Y. Butterworth Chapter 10 M10 F10 3

Example: Recall the data from 3.3 of the marital status and whether or not a person smokes. Let s see if smoking and marital status are independent at the alpha 0.05 level. Married Divorced Single Smokes 54 38 11 103 Not Smoke 146 62 39 247 200 100 50 350 You may recall there were instances when the probability from a contingency table of an intersection was extremely close to the probability if you incorrectly assumed independence well that s because the information may well have been independent! However, that assumption can t be made when the information given is listed in a two-way table! Focus #2 Homogeneity (Gender influence is a popular homogeneity test) H 0 : Proportions are the same for populations H A : Proportions are different for the populations The critical value, expected values and critical values are exactly the same for this test as for the test of independence. It is just the question that we are asking that makes the difference. The focus is on the fact that the population can be broken into subpopulations and that may make a difference in proportions. If there are differences in proportions due to differing subpopulations, then there is dependence refer back to the hypotheses for dependence. Example: The claim has been made that males do better in math courses than females. At the alpha 0.01 level test this claim. Low Average High Male 15 60 25 100 Female 10 35 5 50 25 95 30 150 Y. Butterworth Chapter 10 M10 F10 4

10.2 Chi-Square: Goodness of Fit This is essentially testing the same thing that a 2 sample proportions test does, except this deals with more than 2 samples. This boils down to seeing if the distribution fits a claimed multinomial distribution. Characteristics of Multinomial Experiment 1. Fixed # of trials 2. Trials are independent 3. Outcomes are classified into one of n 2 categories 4. Probability of categories remain constant *Note: This should sound very familiar, as a binomial is a type of multinomial experiment where n=2! Goal of a Goodness of Fit Test See how well an observed frequency distribution conforms to a claimed distribution. Philosophy Behind the Test The closer the observed and expected are the smaller the squared deviations and thus the smaller the test statistic. In a Chi-Squared distribution, smaller values are further to the left and thus have larger probabilities (p-values). As such, we see that we need a right tailed test to reject when we have a large difference between observed and expected and thus are seeing a nonconforming distribution. Notation Used for Test Statistic O Observed values in frequency distribution (always whole numbers) E Expected values under claimed distribution np (not necessarily whole # s) k The number of categories n The total number of trials (equals the sum of the observed) *Note: If the probability of each category is equal then the expected values are n/k. Computation does not need to change, but realizing that only one computation is necessary can save time. Hypotheses H 0 : p 1 =p 2 =p 3 = =p n H Aor1 : At least one difference Critical Value χ 2 α, k 1 This is always a right-tailed test. Alpha is not split ever! Test Statistic χ 2 Σ = (O E) 2 E Rejection Region Decision Reject H 0 for a p-value less than alpha. or a critical value < test χ 2 statistic α,k 1 Using the TI-83/84 Y. Butterworth Chapter 10 M10 F10 5

1) Find the expected values 2) Enter Observed and Expected values in a Matrix (Matrix Edit 2 x k) a) Observed go in first row b) Expected x 10 30 in the second row 3) STAT TESTS χ 2 MatrixA(Get by MATRIX NAMES) Calculate Enter Example: If workers are really sick when they take a sick day then there should be no difference in the frequency of absences given the day of the week. Do you think that the workers really only call in sick when they are sick? Test the claim, that workers only call in sick when they are sick, at the alpha = 0.01 level using the following information from a sample of 100 workers. Day Mon Tues Wed Thurs Fri # Absent 27 19 22 20 12 Example: Test a car manufacturer s claim at the 90% confidence level that 30% of buyers prefer red, 10% prefer white, 15% green, 25% blue, 5% brown and 15% yellow. The following data come from 200 buyers. Color Red White Green Blue Brown Yellow # Prefer 64 14 38 49 6 29 Y. Butterworth Chapter 10 M10 F10 6

10.3 Testing a Claim About a Standard Deviation or Variance The assumptions are the same made for building a confidence interval about the standard deviation. 1) Simple random sample 2) The population must have a normal distribution The test statistic is the Chi-Square statistic that we are familiar with from CI's as well: χ 2 = (n 1) s 2 σ 0 2 Because the Chi-Square distribution is not symmetric we will still need to pay attention to the right and left χ 2 values when finding the critical values. In a table, the χ 2 is given as a righttailed value only, hence for the left tail we need to look up 1 α or 1 α / 2, with the (n 1) degrees of freedom. Example: The claim is that peanut M&M's have weights that vary more than the weights of plain M&M's. The weights of plain M&M's has σ = 0.04g. A sample of 40 peanut M&M's has weights with s = 0.31 g. (#5 p. 424 Triola) Step1: State the hypotheses Step2: Find the critical value(s) & draw the picture Step3: Find the test statistic & locate it on the diagram in 2. Step 4: State the conclusion Y. Butterworth Chapter 10 M10 F10 7

Example: The Stewart Aviation Products Company uses a new production method to manufacture aircraft altimeters. A simple random sample of 81 altimeters is tested in a pressure chamber, and the errors in altitude are recorded as positive values or negative values. The sample has s = 52.3 ft. At α = 0.05 level, test the claim that the new production line has errors with a standard deviation different from the old line which had σ = 43.7 ft. Step1: State the hypotheses Step2: Find the critical value(s) & draw the picture Step3: Find the test statistic & locate it on the diagram in 2. Step 4: State the conclusion Y. Butterworth Chapter 10 M10 F10 8

10.3 Y. Butterworth Chapter 10 M10 F10 9

10.3 Y. Butterworth Chapter 10 M10 F10 10

10.5 One-Way ANOVA: Comparing Several Means Recall the tests for comparing two means from chapter 9.5. Well, ANOVA (Analysis of Variance) is a method for comparing more than two sample means. The analysis of variance as its name implies tests whether the differences in variation are great enough to warrant that the distributions from which the means come are indeed different. To discuss ANOVA we will again need to discuss a new distribution. This new distribution is a quotient of 2 Chi-Squared distributions called the F-distribution. Here are the F-distribution s characteristics: Area = α 1) It only has positive values 2) It is right-skewed 3) The degrees of freedom are paired, one relating to the numerator and one to the denominator χ 2. We are going to give this a VERY short look. There is a lot to discuss in ANOVA, but I m going to make sure that you can read output and conduct a test using that output and know vaguely where that output comes from. We need to know 2 basic things: Factors are the characteristics by which we distinguish the subpopulations Error comes from the within group variability Philosophy Behind the Test We are comparing the error in the factors to the error within the entire group. Not much difference means that the ratio of measurement of variability will be small and if there is a great degree of variability between factors in comparison to overall variability then the ratio will be large and we will get a test statistic which will be in the rejection region. Hypotheses H 0 : µ 1 =µ 2 =µ 3 = =µ n H Aor1 : At least one difference Critical Value F α,n1 1,n2 1 F α, dfe,dft Your book will be discussing BET & W where I will use T & E BET stands for between treatments & and W stands for within the whole Y. Butterworth Chapter 10 M10 F10 11

Test Statistic We need quite a bit of information to find the test statistic, so let s discuss the pieces and how to put them together into a nice table to conduct the test. SSBET(SST) = Sum of the (Σx s) 2 of each factor divided by their sample size minus sum of all x s quantity squared divided by total number of observations. This is the estimate of the common population variance based upon the variation among sample means. SSW(SSE) = Sum of what essentially amounts to the population variances of the factors based upon the samples variances. Find each sum of squares minus sum of x s squared divided by sample size. SSTot = SSBET + SSW This can be computed more easily by hand than SSW(SSE), so it is often times found along with SSBET(SST) and then the SSW(SSE) is found by subtraction. To compute this by hand we sum the sum of squares for each of the factors and subtract the sum of all the factors quantity squared divided by N DFnumerator = DF for Factors = k 1 DFdenominator = DF for Within = N k *Note: N 1=DF bet + DF w k = # of factors (treatments) N = Total # of observations across all factors MSBET(MST) = SSBET/DF bet MSW(MSE) = SSW/DF w F = MSBET MSW ANOVA TABLE Source Sum of Sq DF Mean Sq F Ratio P-Value Between Within Total Decision If the p-value is less than α then reject the null and accept the alternative. If doing a traditional test then the test stat must be beyond the F α,dfbet,dfw. *Note: This is always a right-tail test. TI-83/84 Computations Input 1) Enter the factor data into separate registers in calculator 2) TESTS ANOVA and input registers containing factor data Output F test stat, p-value, Factor Analysis dfbet, SSBET, MSBET Error Analysis dfw, SSW, MSW SXP (which is the pooled standard deviation, which is of no interest to us) Y. Butterworth Chapter 10 M10 F10 12

Example: The data given below is information on head-injuries people received in car crashes in cars of differing weight classifications. At the α =0.05 level test the claim that differing weight classifications makes a difference in sustained head-injuries. Subcompact Compact Midsize Full-Size 681 643 469 384 428 655 727 656 917 442 525 602 898 514 454 687 420 525 259 360 a) Compute the sum of the x s & x 2 for each factor Subcompact Compact Midsize Full-Size Total Σx i Σx i 2 b) Verify that SSBET & SSTot are correct Recall: SSBET = {Σ[(Σx i ) 2 /n i ]} [Σx all ] 2 /N SSTot = Σx i 2 Σx all /N c) Complete the ANOVA table for the data given here. Show calculations. Source DF SS MS F P Trmt 3 88425 0.422 Error 475323 Total 19 563748 d) Give the hypotheses and conduct the test for the question above, using the table given in c). e) Confirm these calculations using your calculator. Y. Butterworth Chapter 10 M10 F10 13