SOLUTION: Find the sample proportions and test statistic for equal proportions. Is the decision close? Find the p-value. a. Dissatisfied workers in two companies: x1 = 40, n1 = 100, x2 =

Algebra ->  Probability-and-statistics -> SOLUTION: Find the sample proportions and test statistic for equal proportions. Is the decision close? Find the p-value. a. Dissatisfied workers in two companies: x1 = 40, n1 = 100, x2 =       Log On


   



Question 160128: Find the sample proportions and test statistic for equal proportions. Is the decision close? Find the p-value.
a. Dissatisfied workers in two companies: x1 = 40, n1 = 100, x2 = 30, n2 = 100, α = .05, two tailed test.
b. Rooms rented at least a week in advance at two hotels: x1 = 24, n1 = 200, x2 = 12, n2 = 50, α = .01, left-tailed test.
c. Home equity loan default rates in two banks: x1 = 36, n1 = 480, x2 = 26, n2 = 520, α = .05, right-tailed test.

Answer by Edwin McCravy(20056) About Me  (Show Source):
You can put this solution on YOUR website!
Find the sample proportions and test statistic for equal proportions. Is the decision close? Find the p-value.
a. Dissatisfied workers in two companies: x1 = 40, n1 = 100, x2 = 30, n2 = 100, α = .05, two tailed test.

1.  Set up the hypotheses:

matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D=p%5B2%5D%29
matrix%281%2C3%2CH%5B1%5D%2C%22%3A%22%2Cp%5B1%5D%3C%3Ep%5B2%5D%29

or, equivalently,

matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D-p%5B2%5D=0%29
matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D-p%5B2%5D%3C%3E0%29

2. Determine the critical region for the test statistic Z:

Since alpha=.05, for rejection of H%5B0%5D, and since
this is a 2-tailed test, we require that either Z%3C-1.96 
or Z%3E1.96

3.  Calculate the three "p-hats":

[Note: I can't put a hat on p on here, so I will 
write ph%5B1%5D for the point estimate of p%5B1%5D,
ph%5B2%5D for the point estimate of p%5B2%5D, and
ph for the pooled estimate of p.  The h
stands for "hat".

ph%5B1%5D=x%5B1%5D%2Fn%5B1%5D=40%2F100=.4 and ph%5B2%5D=x%5B2%5D%2Fn%5B2%5D=30%2F100=.3



4.  Calculate Z the test-statistic by this
terrible formula:



Z=%28.4-.3%29%2F%28sqrt%28.35%281-.35%29%29%2Asqrt%281%2F100%2B1%2F100%29%29

Z=%28.1%29%2F%28sqrt%28.35%28.65%29%29%2Asqrt%282%2F100%29%29

Z=%28.1%29%2F%28sqrt%28.2275%29%2Asqrt%28.02%29%29

Z=1.48

This is not in the rejection-region so we cannot
reject the hypothesis that the proportions of
dissatisfied workers are equal in the two
companies.  So, yes the decision that they are
close is good.

------

The p-value is the probability that the test
statistic Z would be either at least as high as 
1.48 or at least as low as -1.48, if in fact
the two proportions were equal:

So we use a standard normal table to find the
area to the left of z=-1.48, which is .0694.
That's the probability that it is at least as
low as 1.48.  The prbability that it is at
least as high as +1.48 is the same so we 
double the value .0694 and get a p-value of
.1388.

Since this p-value is greater than .05, this
is another way to determine that we cannot
reject H%5B0%5D, so the proportions are
closely the same.

Now if you have a TI-83 or 84 calculator,
you could just clear the screen and do this:

press STAT
use arrow keys to move cursor to hilite TESTS
press 6
beside x1: type 40
beside n1: type 100
beside x2: type 30
beside n2: type 100
beside p1: place cursor onmatrix%281%2C1%2C_%3C%3Ep2%29  
press ENTER
press cursor on Calculate
press ENTER

You see

2-propZtest
p1%3C%3Ep2
z=1.482498633
p=.1382077316
p(hat)1=.4
p(hat)2=.3
p(hat)=.35

Notice that the p-value found by the table was .1388, and
the p-value found by calculator was .1382077316, but that
difference is because with the table we have to round the
z-value from 1.482498633 to 1.48.    

----------------------------------------------------------

b. Rooms rented at least a week in advance at two hotels: x1 = 24, n1 = 200, x2 = 12, n2 = 50, α = .01, left-tailed test.

1.  Set up the hypotheses:

matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D=p%5B2%5D%29
matrix%281%2C3%2CH%5B1%5D%2C%22%3A%22%2Cp%5B1%5D%3Cp%5B2%5D%29

or, equivalently,

matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D-p%5B2%5D=0%29
matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D-p%5B2%5D%3C0%29

2. Determine the critical region for the test statistic Z:

Since alpha=.01, for rejection of H%5B0%5D, and since
this is a left-tailed test, we require that Z%3C-2.33,
since -2.33 is the z-value that has the area .01 to the left 
of it.

3.  Calculate the three "p-hats" same as the other problem:

ph%5B1%5D=x%5B1%5D%2Fn%5B1%5D=24%2F200=.12 and ph%5B2%5D=x%5B2%5D%2Fn%5B2%5D=12%2F50=.24



4.  Calculate Z the test-statistic by the same
terrible formula:



Z=%28.12-.24%29%2F%28sqrt%28.144%281-.144%29%29%2Asqrt%281%2F200%2B1%2F50%29%29

Z=%28-.12%29%2F%28sqrt%28.144%28.856%29%29%2Asqrt%28.025%29%29

Z=%28-.12%29%2F%28sqrt%28.123264%29%2Asqrt%28.025%29%29

Z=-2.16

This is not in the rejection-region so we cannot
reject the hypothesis that the proportions of
rooms rented at least a week in advance are equal 
in the two hotels.  So, yes the decision that they 
are close is good.

The p-value is the probability that the test
statistic Z would be at least as low as -2.16, 
if in fact the two proportions were equal:

So we use a standard normal table to find the
area to the left of z=-2.16, which is .0154.
That's the probability that it is at least as
low as -2.16.  So that is the p-value.  [We
only double in the case of a two-tailed test.]

Since this p-value is greater than .01, this
is another way to determine that we cannot
reject H%5B0%5D, so the proportions are
closely the same.

Now if you have a TI-83 or 84 calculator,
you could just clear the screen and do this:

press STAT
use arrow keys to move cursor to hilite TESTS
press 6
beside x1: type 24
beside n1: type 200
beside x2: type 12
beside n2: type 50
beside p1: place cursor onmatrix%281%2C1%2C_%3Cp2%29  
press ENTER
put cursor on Calculate
press ENTER

You see

2-propZtest
p1%3Cp2
z=-2.161688506
p=.0153210422
p(hat)1=.12
p(hat)2=.24
p(hat)=.144

Notice that the p-value found by the table was .0154, and
the p-value found by calculator was 0153210422, but that
difference is because with the table we have to round the
z-value from -2.161688506 to -2.16.  That's not as big a
round-off error as in the preceding problem, so it wasn't
as far off.     

----------------------------------------------------------

c. Home equity loan default rates in two banks: x1 = 36, n1 = 480, x2 = 26, n2 = 520, α = .05, right-tailed test.

1.  Set up the hypotheses:

matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D=p%5B2%5D%29
matrix%281%2C3%2CH%5B1%5D%2C%22%3A%22%2Cp%5B1%5D%3Ep%5B2%5D%29

or, equivalently,

matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D-p%5B2%5D=0%29
matrix%281%2C3%2CH%5B0%5D%2C%22%3A%22%2Cp%5B1%5D-p%5B2%5D%3E0%29

2. Determine the critical region for the test statistic Z:

Since alpha=.05, for rejection of H%5B0%5D, and since
this is a left-tailed test, we require that Z%3E1.64,
since 1.64 is the z-value that has the area .05 to the right 
of it.

3.  Calculate the three "p-hats" same as the other 2 problems:

ph%5B1%5D=x%5B1%5D%2Fn%5B1%5D=36%2F480=.075 and ph%5B2%5D=x%5B2%5D%2Fn%5B2%5D=26%2F520=.05



4.  Calculate Z the test-statistic by the same
terrible formula:



Z=%28.075-.05%29%2F%28sqrt%28.062%281-.062%29%29%2Asqrt%281%2F480%2B1%2F520%29%29

Z=%28.025%29%2F%28sqrt%28.062%28.938%29%29%2Asqrt%28.004%29%29

Z=%28.025%29%2F%28sqrt%28.058156%29%2Asqrt%28.004%29%29

Z=1.64

This is exactly at the boundary of the rejection-region so 
it is really a toss-up as to whether we should reject the 
hypothesis that the propportions of loan default-rates are 
equal at the two banks.  So, this test is a failure.  We
would need more data.

The p-value is the probability that the test
statistic Z would be at least as high as 1.64, 
if in fact the two proportions were equal:

So if we use a standard normal table to find the
area to the right of z=1.64, we should find it to
be alpha=.05 which is what we expect to happen
whenever the test-statistic turns out to be the same
as the boundary of the rejection region, as it did in
his case.

Now if you have a TI-83 or 84 calculator,
we will be much more accurate.  Just clear the screen 
and do this:

press STAT
use arrow keys to move cursor to hilite TESTS
press 6
beside x1: type 36
beside n1: type 480
beside x2: type 26
beside n2: type 520
beside p1: place cursor onmatrix%281%2C1%2C_%3Ep2%29  
press ENTER
put cursor on Calculate
press ENTER

You see

2-propZtest
p1%3Ep2
z=1.63781572
p=.050730057
p(hat)1=.075
p(hat)2=.05
p(hat)=.062

Notice that the p-value found with the calculator is
very slightly more than .05, so according to this
more accurate calculation, we should not reject H%5B0%5D.
However it is still so very close to .05 that more data 
should be obtained before a decision is made.

Edwin