ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Work Shown continues down the page
Given Dataalpha =0.05
Work Shown continues down the page
2
3 or More Bedrooms
3
House PriceYesNoRounding Precision =6
4
Less than $300K344499
5
$300-450K190334
6
$450-600K133293
7
8
Compute Row and Column Totals
9
3 or More Bedrooms
10
House PriceYesNoTotal
11
Less than $300K344499843
12
$300-450K190334524
13
$450-600K133293426
14
Total66711261793
15
Use the command SUM to add values quickly
16
17
Work Shown continues down the page
Compute Expected Values for each cell
Work Shown continues down the page
18
19
For example, we expect the value 313.597881 in row1,column1 since:
20
E = (rowTotal*columnTotal)/N
21
E = (843*667)/1793
22
E = 313.59788064696
23
E = 313.597881
24
25
3 or More Bedrooms
26
House PriceYesNo
27
Less than $300K313.597881529.402119
28
$300-450K194.929169329.070831
29
Work Shown continues down the page
$450-600K158.47295267.52705
Work Shown continues down the page
30
31
Compute [ (Observed-Expected)^2 ]/[ expected ]
32
Example: ((O-E)^2)/E=((344-313.597881)^2)/313.597881 =2.94737 for row1,column1
33
3 or More Bedrooms
34
House PriceYesNo
35
Less than $300K2.947371.745911
36
$300-450K0.1246440.073834
37
Work Shown continues down the page
$450-600K4.0945232.425441
Work Shown continues down the page
38
39
r = 3 rows, c = 2 columns
40
degrees of freedom = df = (r-1)*(c-1) = (3-1)*(2-1) = 2
41
ChiSquare Test Statistic =
11.411723
which is the sum of all the items in the table above
42
ChiSquare Critical Value
5.991
by using the function CHIINV; or use ChiSquare table
43
Test statistic 11.411723 is greater than the critival value 5.991
44
Are we in the
rejection region?
Yes
45
Decision: Reject the null
46
47
P-value0.003326
Use the command CHIDIST
48
P-value 0.003326 is less than alpha = 0.05
49
End of PageDecision: Reject the nullEnd of Page
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100