-Test
function
-Test
function
-Test
function
Died or suffered a heart attack | Did not die or suffer a heart attack | |
Directional Atherectomy | 44 | 468 |
Balloon Angioplasty | 23 | 477 |
The hypotheses for this problem are:
.
Now we need to determine the expected frequencies under H_{0}.
For this, we will need the row, column and overall totals.
Let's add these to our table.
Died or suffered a heart attack | Did not die or suffer a heart attack | ||
Directional Atherectomy | 44 | 468 | 512 |
Balloon Angioplasty | 23 | 477 | 500 |
67 | 945 | 1012 |
Starting in the upper left, we have . Then we will have , , and . It is convenient to put these values into our table.
Died or suffered a heart attack | Did not die or suffer a heart attack | |
Directional Atherectomy | 44 (33.9) | 468 (478.1) |
Balloon Angioplasty | 23 (33.1) | 477 (466.9) |
Now we can get the test statistic:
Set up the rejection region by drawing a
curve
(just draw a somewhat right-skewed curve) and shade
the last 1% of the right tail. We need the
critical value associated with this area.
The degrees of freedom for this problem are
,
so we have
.
Note that
tests will always have two-tailed alternative
hypotheses, but we will not split up
into both tails
of the curve when setting up a rejection region.
curves are right-skewed, and the rejection region is always
in the right tail.
We get this critical value with the EQUATION SOLVER
,
just like we did for t critical values.
Under the MATH
menu, choose Solver
.
You may just have to change tcdf
to cdf
if you used the EQUATION SOLVER
last to get a t
critical value.
If not, enter in variables for the arguments like you see above;
L
is for Lower bound,
U
is for Upper bound,
D
is for Degrees of freedom, and
A
is for Area.
We want the value such that there is 1% of the area to the right
of that value. Let's have the calculator solve for U
, so
enter zero on that line for a "guess".
curves start at zero (see page 682 of your textbook),
so enter 0
for L
, the lower bound.
We have 1 degree of freedom,
and the area between the lower and upper bound should be .99.
With the cursor on the U=0
line,
press SOLVE
(ALPHA ENTER
).
This calculation will take about 15 seconds.
We now see that
.
It comes close, but the test statistic does not
fall into the rejection region, i.e.,
6.522
6.635, therefore we do not reject H_{0}.
No, there is no evidence of a significant difference in
the two medical approaches with respect to the proportion of
deaths or heart attacks within 6 months of treatment.
Now let's get the p-value associated with this problem.
This is
.
We will use the cdf
function to get this
probability, like you see below.
So we have . Do not reject H_{0}.
-Test
function.
Under STAT TESTS
, choose -Test
.
By default, the calculator expects the contingency table with the observed values to be in matrix
A
.
Go to [2nd] MATRX EDIT
. Select A
.
Define the dimension to be 2 x2
.
Enter in the observed frequencies from our contingency table,
replacing the default zeros.
You need not do anything for
B
, the Expected
frequencies matrix.
Go back to STAT TESTS
, and choose
-Test
.
With the cursor on Calculate
, press ENTER
.
This gives the same results as before. The matrix of expected frequencies can be viewed, if we want to check on our calculations from before. Go back to [2nd]
MATRX EDIT
. Select B
and press
ENTER
.
Indeed, these are the same expected values that we got by hand.
Another useful option is Draw
. Go back and choose
Draw
instead of Calculate
.
A curve with 1 degree of freedom is extremely right-skewed. Also, the test statistic is too large to show up on the graph, even though it's not in the rejection region! The critical value is off-screen to the right as well.
Purchase Cable Television? | Single-Family | Two- to Four-Family | Apartment House | Total |
Yes | 94 | 39 | 77 | 210 |
No | 56 | 36 | 98 | 190 |
Total | 150 | 75 | 175 | 400 |
At the .01 level of significance, is there evidence of a significant difference among types of residence with respect to the proportion of households that adopt the cable TV service?
H_{0}: p_{1} = p_{2} = p_{3}
H_{1}: Not all p_{j} are equal (where j = 1, 2, 3).
Let's determine the expected frequencies under H_{0}. Starting in the upper left, we have . Then we will have , , and , and , and . Again, let's put these values into the table.
Purchase Cable Television? | Single-Family | Two- to Four-Family | Apartment House | Total |
Yes | 94 (78.75) | 39 (39.375) | 77 (91.875) | 210 |
No | 56 (71.25) | 36 (35.625) | 98 (83.125) | 190 |
Total | 150 | 75 | 175 | 400 |
Now we can get the test statistic:
Let's set up the rejection region. This problem also uses
.
Draw a
curve and shade
the last 1% of the right tail. We need the
critical value associated with this area.
The degrees of freedom for this problem are
,
so we have
.
Get this critical value with the EQUATION SOLVER
,
just like we did for the first problem.
We now see that
.
The test statistic falls into the rejection region, i.e.,
11.302 > 9.210, therefore we reject H_{0}.
Yes, there is evidence of a significant difference
among types of residence with respect to the proportion of
households that adopt the cable TV service.
Now let's get the p-value associated with this problem. This is .
So we have
.
Reject H_{0}.
-Test
function.
We will have to change the matrix A
(or use a different matrix).
Change the dimension to 2 x3
.
Enter in the observed frequencies from the contingency table.
Leave B
as is.
With the cursor on Calculate
, press ENTER
.
This gives the same results as before. Let's check if the matrix of expected frequencies matches our calculations from before.
Now go back and choose
Draw
.
A
curve with 2 degree of freedom is also very
right-skewed. And again, the test statistic is too large
to show up on the graph.
Financial Condition | H.S. Degree or Lower | Some College | College Degree or Higher | Total |
Worse off now than before | 91 | 39 | 18 | 148 |
No difference | 104 | 73 | 31 | 208 |
Better off now than before | 235 | 48 | 161 | 444 |
Total | 430 | 160 | 210 | 800 |
At the .05 level of significance, is there evidence of a relationship between financial condition and education level?
H_{0}: Financial condition and Education level are independent
H_{1}: Financial condition and Education level are dependent
This problem would be fairly easy to do by hand, but since we've
already done two that way, let's skip it and go straight to
using the -Test
function.
Change the matrix A
to have dimension 3 x3
.
Enter in the observed frequencies from the contingency table.
Again, leave B
as is.
We now see that (!)
Let's look at the matrix of expected frequencies,
since they must disagree with the observed frequencies quite a bit.
Let's add these to the table:
Financial Condition | H.S. Degree or Lower | Some College | College Degree or Higher | Total |
Worse off now than before | 91 (79.55) | 39 (29.6) | 18 (38.85) | 148 |
No difference | 104 (111.8) | 73 (41.6) | 31 (54.6) | 208 |
Better off now than before | 235 (238.65) | 48 (88.8) | 161 (116.55) | 444 |
Total | 430 | 160 | 210 | 800 |
Many of these expected frequencies do indeed differ greatly from
the observed frequencies, especially in the second and third columns.
Now go back and choose Draw
, if only to see what a
curve with 4 degrees of freedom looks like. (Right-skewed, of course!)
For this problem, we have
.
Lastly, let's use Excel/PHStat to do this problem.
This time enter .05 for the Level of Significance,
enter 3 for the Number of Rows, and
enter 3 for the Number of Columns.
The results will be the same as before.