Download presentation
1
Welcome to . Week 13 Tues . MAT135 Statistics
2
In-Class Project Cephalic Index Use the giant calipers to measure the width of your head from side to side – be sure to use the inches measurement inside the calipers Then measure the depth of your skull from front to back
3
In-Class Project To find your cephalic index, divide the width by the depth and multiply by 100
4
In-Class Project If your cephalic index is greater than 83, it is called “brachycephalic” If your cephalic index is less than 75, it is called “dolichocephalic” Between these two numbers, you are “mesocephalic”
5
In-Class Project These measurements are used to investigate genealogy – please record your ancestry on the sheet, too Be sure to keep a copy of your results for later!
6
Hypothesis Tests So far we’ve tested hypotheses about means: μ = value use a z-test μ1= μ2 use a t-test μ1= μ2 = μ3 use an F-test (ANOVA) ? ? ?
7
WHAT ABOUT OTHER TYPES OF DATA AND OTHER HYPOTHESES ???
Hypothesis Tests WHAT ABOUT OTHER TYPES OF DATA AND OTHER HYPOTHESES ???
8
Tests for Count Data Another type of data would be counts (frequencies) in categories: Sibling Study Brothers Sisters Total Observed # 31 21 52
9
Tests for Count Data The hypothesis you would be testing would not be about mean values… Sibling Study Brothers Sisters Total Observed # 31 21 52
10
Tests for Count Data An alternate hypothesis might be: Are brothers and sisters equally likely? Ha: #bro ≠ #sis Sibling Study Brothers Sisters Total Observed # 31 21 52
11
Tests for Count Data The hypothesis can be based on science or history or some other “educated guess” Sibling Study Brothers Sisters Total Observed # 31 21 52
12
Tests for Count Data A null hypothesis you might have about this data would be: H0: #bro = #sis Sibling Study Brothers Sisters Total Observed # 31 21 52
13
… We’ll use a test called “Chi-Square” “X 2”
Tests for Count Data … We’ll use a test called “Chi-Square” “X 2” Sibling Study Brothers Sisters Total Observed # 31 21 52
14
Tests for Count Data A Chi-Square is shaped like an F distribution (both are squared)
15
Tests for Count Data A Chi-Square needs the original data and some “hypothesized” data Sibling Study Brothers Sisters Total Observed # 31 21 52 Hypothesized # 26
16
Tests for Count Data The “hypothesized” data are called “expected” values Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26
17
Tests for Count Data The hypothesized values must add up to the original total count Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26
18
Tests for Count Data They will come from the null (want-to-disprove) hypothesis H0: #bro = #sis Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26
19
Tests for Count Data To calculate the ChiSq, we use the formula: (𝑶−𝑬) 𝟐 𝑬
20
(𝑶−𝑬) 𝟐 𝑬 Calculate O-E Sibling Study Brothers Sisters Total
Chi-Square PROJECT QUESTION (𝑶−𝑬) 𝟐 𝑬 Calculate O-E Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 O-E 5 -5
21
(𝑶−𝑬) 𝟐 𝑬 Square the O-E values
Chi-Square PROJECT QUESTION (𝑶−𝑬) 𝟐 𝑬 Square the O-E values Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2 25
22
(𝑶−𝑬) 𝟐 𝑬 Divide them by E Sibling Study Brothers Sisters Total
Chi-Square PROJECT QUESTION (𝑶−𝑬) 𝟐 𝑬 Divide them by E Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
23
(𝑶−𝑬) 𝟐 𝑬 Add them up: 25/26 + 25/26 = 1.923076923
Chi-Square PROJECT QUESTION (𝑶−𝑬) 𝟐 𝑬 Add them up: 25/ /26 = Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
24
Ok, so our CHiSq statistic is 1.923076923 We need a probability!
Chi-Square PROJECT QUESTION Ok, so our CHiSq statistic is We need a probability! Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
25
Using “2nd” “0” X2cdp(1.923076923,9999,1) The p value is: .1655178562
Chi-Square PROJECT QUESTION Using “2nd” “0” X2cdp( ,9999,1) The p value is: Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
26
The p value is: .1655178562 Do we reject H0?
Chi-Square PROJECT QUESTION The p value is: Do we reject H0? Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
27
Chi-Square PROJECT QUESTION The p value is: Do we reject H0? Nope, the values are not different enough Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
28
Chi-Square PROJECT QUESTION The p value is: Do we reject H0? Nope, the values are not different enough What could we do? Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
29
Chi-Square PROJECT QUESTION The p value is: Do we reject H0? Nope, the values are not different enough What could we do? Increase n Sibling Study Brothers Sisters Total Observed # 31 21 52 Expected # 26 (O-E)2/E 25/26
30
Tests for Count Data The t-test and ANOVA F-test were designed to be powerful (reject H0 a lot) even with small sample sizes
31
Tests for Count Data A Chi-Square test is not very powerful It only rejects the hypothesis when the data are very VERY different
32
Tests for Count Data This means it is a very conservative test – nobody is going to think you cheated if you use a Chi-square!
33
Tests for Count Data It also means we don’t have to set a level of practical significance…
34
Questions?
35
Tests for Count Data Most Chi-Squared tests don’t have specific hypothesized values
36
Tests for Count Data Most Chi-Squared tests don’t have specific hypothesized values The expected values come from the table of observed data
37
Tests for Count Data Ha: p1 ≠ p2 H0: p1 = p2
38
Tests for Count Data To compare two ways to removing plaque clogging arteries, Dr. Eric J. Topol and colleagues conducted a study
39
Tests for Count Data They randomly assigned 1,012 heart patients to have either directional coronary atherectomy or balloon angioplasty
40
Tests for Count Data Is there evidence of a significant difference in the two approaches in the proportion of deaths or heart attacks within 6 months of treatment?
41
What would be Dr. Topol’s alpha-level?
Chi-Square PROJECT QUESTION What would be Dr. Topol’s alpha-level?
42
What would be his alternate hypothesis?
Chi-Square PROJECT QUESTION What would be his alternate hypothesis?
43
Chi-Square PROJECT QUESTION What would be his alternate hypothesis? Ha: p death or heart attack for directional atherectomy ≠ p death or heart attack for balloon angioplasty
44
What would be his null hypothesis?
Chi-Square PROJECT QUESTION What would be his null hypothesis?
45
Chi-Square PROJECT QUESTION What would be his null hypothesis? H0: p death or heart attack for directional atherectomy = p death or heart attack for balloon angioplasty
46
Died or suffered a heart attack Did not die or suffer a heart attack
Chi-Square PROJECT QUESTION Do you think there is a practically significant difference? Died or suffered a heart attack Did not die or suffer a heart attack Directional Atherectomy 44 468 Balloon Angioplasty 23 477
47
Click “MATRX” Go to “EDIT” Make sure it’s on “[A]” Hit “ENTER”
Chi-Square PROJECT QUESTION Click “MATRX” Go to “EDIT” Make sure it’s on “[A]” Hit “ENTER”
48
It should look like: MATRIX[A] 1 ×1 [ 0 ]
Chi-Square PROJECT QUESTION It should look like: MATRIX[A] 1 ×1 [ 0 ]
49
Chi-Square PROJECT QUESTION It wants to know how big our observed data “matrix” is MATRIX[A] 1 ×1 [ 0 ]
50
The size of a matrix is: #rows × #columns MATRIX[A] 1 ×1 [ 0 ]
Chi-Square PROJECT QUESTION The size of a matrix is: #rows × #columns MATRIX[A] 1 ×1 [ 0 ]
51
Died or suffered a heart attack Did not die or suffer a heart attack
Chi-Square PROJECT QUESTION How big is the matrix? (ignore labels and totals) MATRIX[A] 1 ×1 [ 0 ] Died or suffered a heart attack Did not die or suffer a heart attack Directional Atherectomy 44 468 Balloon Angioplasty 23 477
52
Died or suffered a heart attack Did not die or suffer a heart attack
Chi-Square PROJECT QUESTION MATRIX[A] 2 ×2 [ 0 0 ] Died or suffered a heart attack Did not die or suffer a heart attack Directional Atherectomy 44 468 Balloon Angioplasty 23 477
53
Died or suffered a heart attack Did not die or suffer a heart attack
Chi-Square PROJECT QUESTION Go to the data row and enter the data values: MATRIX[A] 2 ×2 [ ] [ ] Died or suffered a heart attack Did not die or suffer a heart attack Directional Atherectomy 44 468 Balloon Angioplasty 23 477
54
The TI will calculate the expected values for you!!
Chi-Square PROJECT QUESTION The TI will calculate the expected values for you!!
55
Click “STAT” “TESTS” “X2-Test” “ENTER”
Chi-Square PROJECT QUESTION Click “STAT” “TESTS” “X2-Test” “ENTER”
56
Chi-Square PROJECT QUESTION X2-Test Observed: [A] Expected: [B] Calculate Draw Highlight “Calculate” “ENTER”
57
Chi-Square PROJECT QUESTION Can we reject H0?
58
Can we reject H0? At 5% yes, at 1% no…
Chi-Square PROJECT QUESTION Can we reject H0? At 5% yes, at 1% no…
59
Chi-Square PROJECT QUESTION Can we reject H0? At 5% yes, at 1% no… Remember, the Chi-Square is a VERY conservative test
60
Chi-Square PROJECT QUESTION What could Dr. Topol do to make it more likely that he would find a significant difference?
61
Sometimes you want to know what the expected values were for your data
Chi-Square PROJECT QUESTION Sometimes you want to know what the expected values were for your data
62
Chi-Square PROJECT QUESTION Sometimes you want to know what the expected values were for your data Click “MATRX” “EDIT” Go to [B] “ENTER”
63
Chi-Square PROJECT QUESTION
64
Questions?
65
Tests for Count Data Suppose we had a larger matrix: Senate Voting Dem
Rep Indep Favor . 25 4 2 Oppose . 20 42 1
66
Tests for Count Data It works the same way! Senate Voting Dem Rep
Indep Favor . 25 4 2 Oppose . 20 42 1
67
Tests for Count Data p = 5.58756E-6 = 0.0000058756 Senate Voting Dem
Rep Indep Favor . 25 4 2 Oppose . 20 42 1
68
Tests for Count Data so you reject H0 and conclude…
69
Tests for Count Data …there is a statistically significant difference between the way the parties vote on this issue
70
Tests for Count Data How would we tell which are different?
71
Tests for Count Data The hi-lo-close graph!
72
Tests for Count Data Or the 3d column chart
73
Tests for Count Data Note: Excel won’t handle an expected value of “0” – you must leave these out of your analysis
74
Questions?
75
In-Class Project Which cephalic are you? European people are believed to be more dolichocephalic African and Middle-Eastern people are more often mesocephalic East Asian, Hispanic and native American people are more often brachycephalic
76
In-Class Project Does your head reflect your genealogy?
77
In-Class Project It’s not just for people!
Dolichocephalic Mesocephalic Brachycephalic
78
You survived! Turn in your homework! Don’t forget your homework due next class! See you Thursday!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.