c 2 test for independence
-
Upload
eaton-gonzalez -
Category
Documents
-
view
27 -
download
0
description
Transcript of c 2 test for independence
2 test for independence
•Used with categorical, bivariate data from ONE sample
•Used to see if the two categorical variables are associated (dependent) or not associated (independent)
Assumptions & Assumptions & formula remain the formula remain the
same!same!
Hypotheses – written in Hypotheses – written in wordswords
H0: two variables are independentHa: two variables are dependent
Be sure to write in context!
Example 5: A beef distributor wishes to determine whether there is a relationship between geographic region and cut of meat preferred. If there is no relationship, we will say that beef preference is independent of geographic region. Suppose that, in a random sample of 500 customers, 300 are from the North and 200 from the South. Also, 150 prefer cut A, 275 prefer cut B, and 75 prefer cut C.
If beef preference is independent of geographic region, how would we expect this table to be filled in?
North South Total
Cut A 150
Cut B 275
Cut C 75
Total 300 200 500
90 60
165
110
45 30
Expected Counts Expected Counts
•Assuming H0 is true,
totaltable
alcolumn tot totalrow counts expected
Degrees of freedomDegrees of freedom
)1c)(1(r df
Or cover up one row & one column & count the number of cells remaining!
Now suppose that in the actual sample of 500 consumers the observed numbers were as follows:
Is there sufficient evidence to suggest that geographic regions and beef preference are not independent? (Is there a difference between the expected and observed counts?)
North South
Cut A 100 50
Cut B 168 107
Cut C 32 43
Assumptions:
•Have a random sample of people
•All expected counts are greater than 5.
H0: geographic region and beef preference are
independent Ha: geographic region and beef
preference are dependent
P-value = .0021 df = 2 = .05
Since p-value < , I reject H0. There is sufficient evidence to suggest that geographic region and beef preference are dependent.
30.12...
60
6050
90
90100 222
Expected Counts:
N S
A 90 60
B 165 110
C 45 30
Example 6 : Suppose that residents of a particular city can watch national news on affiliates of 4 different networks: ABC, CBS, PBS and NBC. A researcher wants to know whether there is any relationship between political philosophies (liberal, moderate or conservative) and the network they watch for news. A random sample of 300 viewers was selected, and the results are given below:
SURVEY RESULTS
ABC CBS NBC PBS
Liberal 20 20 25 15
Moderate 45 35 50 20
Conservative
15 40 10 5
Each observation consists of .
We would like to test whether there is .
1. State null and alternate hypothesis
ASSUMPTIONS:
EXPECTED COUNTSABC CBS NBC PBS
LiberalModerateConservative
2. Calculate statistics:Expected counts:
Degrees of freedom:
Use the graphing calculator to calculate P-value.
3. State conclusion.
22 test for homogeneity test for homogeneity
•Used with a single single categoricalcategorical variable from two (or more) independent two (or more) independent samplessamples
•Used to see if the two populations are the same (homogeneous)
Assumptions & formula remain the same!
Expected counts & df are found the same way as test for independence.
OnlyOnly change is the hypotheses!
Hypotheses – written in Hypotheses – written in wordswords
H0: the two (or more) distributions are the sameHa: the distributions are different
Be sure to write in context!
Separate random samples of 124 consumers and 101 dentists were asked to respond to the following statement: “I favor the use of advertising by dentists to attract new patients.” Possible responses were strongly agree, agree, neutral, disagree, and strongly disagree. The authors were interested in determining whether the two groups – consumers and dentists – differed in their attitudes towards advertising.
SURVEY RESPONSESStrongly Agree
Agree Neutral DisagreeStrongly Disagree
Dentists 34 49 9 4 5Consumers 9 18 23 28 46
Assumptions:
•Have 2 random samples.
•All expected counts are greater than 5.
H0: the true proportions are the same for both groups.
Ha: the true proportions differ in at least one category
P-value = .000 df = 4 = .05
Since p-value < , I reject H0. There is sufficient evidence to conclude that the true proportion for the 2 groups differ.
5.84...
1.30
1.3049
3.19
3.1934 222
Expected CountsStrongly Agree
Agree Neutral DisagreeStrongly Disagree
Dentists 19.3 30.1 14.4 14.4 22.9Consumers 23.7 36.9 17.6 17.6 28.1
From pollingreport.com: CNN/Opinion Research Corporation Poll. June 16, 2010. N=500 adults nationwide. MoE ± 4.
"How do you feel about increased drilling for oil and natural gas offshore in U.S. waters? Do you strongly favor, mildly favor, mildly oppose or strongly oppose increased offshore drilling?"
StronglyFavor
MildlyFavor
MildlyOppose
Strongly Oppose
June, 2010
130 115 85 170
July, 2008
225 115 60 100