Title: What if s is unknown
1What if s is unknown?
When you dont know s, you estimate it with s but
the distribution becomes a t with n-1 degrees of
freedom.
Z is used because the statistic below is
standard normal when s is known.
2(No Transcript)
3Properties of the t-distn.
- For the Z (standard
- normal)
- Symmetric about 0
- By the Emperical Rule, it ranges approximately
from -3 to 3
- For the t
- Symmetric about 0
- Ranges approximately from -5 to 5
4Finding t
- You find t just as you find z except that you
use Table B-3, you go to the row that corresponds
to n-1 degrees of freedom. - If you want to be 90 confident and n20, then
.
t 1.729
5 7.2 Confidence interval for ? based on
when ? is unknown the t-interval.
The standard error of the estimate.(SE)
An estimate for µ
Depends on how confident you want to be.
6Margin of Error
- The margin of error (ME ) is half the width of
the confidence interval.
7Steps to calculate CI for ?
- Calculate estimate and SE( )
- where s is the sample standard deviation
- Find the critical value t from the Table. Its
the upper ?/2 critical value with dfn-1 - ME t SE
- (1-?)100 CI for ? is given by
- CI ME
8Finding the sample size.
- For a given bound B on the margin of error, the
sample size
9Example 7.2 continued
- Compute a 90 confidence interval for the mean
fuel capacity of this model of car based on a
sample of 16 cars with sample mean 18 gallons and
s3.5.
10 11Types of tests
- One-sided alternative like Ha ? gt ?0 Ha ?
lt ?0 - focuses on deviations from the null hypothesis
value in only one direction. - Two-sided alternative like Ha ? ? ?0 concern
the deviation from the null hypothesis in either
direction. - right-tailed test
- left-tailed test
- two-tailed test
12P-value for right tailed test
p-value P(ZgtZobs)
For both, the p-value is the area to the right of
the TS.
TS
TS
Here, the p-value is less than a.
Here, the p-value is greater than a.
13P-value for left tailed test
p-value P(ZltZobs)
TS
TS
For both, the p-value is the area to the left of
the TS.
14P-value for Two Sided Test
Ha ? ? ?0
p-value 2P(Z gt Zobs)
P-value/2
P-value/2
TS
TS
For both, half of the p-value is the area to the
right of the Zobs. Zobs gt0
15P-value for Two Sided Test
Ha ? ? ?0
p-value 2P(Z gt Zobs)
P-value/2
P-value/2
TS
TS
For both, half of the p-value is the area to the
left of the Zobs. Zobslt0
16p-Value
- It depends on the right-tailed, left-tailed and
two-tailed test. - Left tailed test p-value P(ZltZobs)
- Right tailed test p-value P(ZgtZobs)
- Two tailed test p-value 2P(ZgtZobs)
17Example 8.3
- A mathematician (John Kerrich) tossed a coin
10,000 times to determine whether it was fair. He
actually got 5067 heads.
18- Simple Answer
- P-value0.1802gt0.05
- Based on the data, there is insufficient evidence
to say that the coin is not fair.
19Exercise 8.1
- The standard medication for a certain disease is
effective in 60 of all cases. A drug company
believes its new drug is more effective than the
old treatment. - Suppose that the drug company investigates 200
cases and finds that the new drug is effective in
134 cases. Is this enough evidence to reject Ho
and say that ?gt.60?
20- Ho ?.60 Ha ?gt.60
- P-value.0217lt0.05
- Reject H0
21 Possible errors
- Deciding against H0 when it is in fact true,
this is called a Type I error. - In the legal analogy, a Type I error means
convicting an innocent person. - Deciding to stick with H0 when Ha is in fact
true, this is called a Type II error. - In the legal analogy, a Type II error means
acquitting a guilty person.
22Example 8.4
- In medical disease testing,
- H0A person tested is healthy
- Ha The person has the disease we are testing for
- What would be the Type I and Type II error
- here? What type of error would the person
consider more serious?
23- Type I error A healthy person is diagnosed with
the disease. - Type II error An infected person is diagnosed as
disease free.
24Note
- Which of these errors seems more serious depends
on the situation and your point of view.
254 Possibilities
OUR DECISION
THE TRUTH
Fail to Reject H0 (H0 is TRUE)
The ones in green are correct decisions No
Error. The ones in red are errors.
H0 is TRUE
Reject H0 (H0 is FALSE)
Fail to Reject H0 (H0 is TRUE)
H0 is FALSE
Reject H0 (H0 is FALSE)
26Illustration of two types of error
The truth
a
Decision
ß
27Probability of two types of error
- When H0 is true, only type I error probably
happen, with probability - a P(Type I Error)
- When H0 is false, only type II error probably
happen, with probability - ß P(Type II Error)
- Note Reducing ßcould increase a, vice versa.
28Making a decision
Standard Normal
The Critical Value is where this shading starts.
If the test statistic falls in this region, well
reject H0. Otherwise, fail to reject H0.
a P(Type I Error) level of significance
29One Sided Tests (Right and Left)
Ha p gt p0
Ha p lt p0
a
30Two Sided Test
- All tests use the same test statistic.
- For all tests, Reject H0 when the observed test
statistic is in the rejection region.
Ha p ? p0
a/2
31 Test Statistic
Test Statistic
In this case, the test statistic (TS) has not
gone into this red region (critical region) so we
fail to reject H0.
In this case, the TS is in the critical region,
therefore we will reject H0.
32ß
33Equivalence of Confidence Intervals and
Two-tailed Tests
- The null hypothesis Ho ??0 versus alternative
Ha ???0 is rejected at an a level of
significance if and only if the hypothesized
value falls outside a - (1-?)100 confidence interval for ?.
348.3 Testing a Population Mean µ
- The same general principles apply as they
- did for tests about p.
- We need a test statistic.
- We need to know the distribution of the test
statistic. - Compute the p-value and compare it to a.
35- If s is known or ngt30, using Z-test. The test
statistic is - Use a Z (standard normal)
- to obtain p-values and
- critical values.
- If s is unknown, using T-test. The test statistic
is - Use a t distribution with n-1
- Degrees of freedom obtain
- p-values and critical values.
36Note
- Whether you have a test about p or µ,
- you always reject H0 if p-value lta.
-
37Example 8.5
- Suppose the researcher selects a random sample of
100 county residents and finds that their average
per capita income is 16,200. Suppose we
know ?4,000, Is the evidence sufficient to
suggest that the mean capita income of the
country residents is greater than 15,000.
38- P-value0.0013
- Based on the result of sample of 200 residents,H0
is rejected. i.e. there is significant evidence
that the mean capital income of the country
residents is greater than 15000
39Example 8.6
- A factory makes a certain computer part that,
according to specifications, must have a mean
length of 1.5 centimeters. In a random sample of
16 parts from a shipment, the average length was
found to be 1.56 centimeters and the sample
standard deviation was 0.09 centimeter. Should
this shipment be rejected based on the level of
significance .05?
40- P-value.0174lt0.05
- Based on a random sample 16 parts, reject H0 at
the 5 level of significance. i.e. there is
significant evidence that the shipment should be
rejected.
41Exercise 8.2
- The scores on a college placement exam in
mathematics are assumed to be normally
distributed with a mean of 70 and a standard
deviation of 18. The exam is given to a random
sample of 50 high school seniors who have been
admitted to college. Their average score on the
exam was 67. Is the evidence sufficient to
suggest that the population mean score is lower
than or equal to 70?
42- P-value.1190
- Fail to reject H0,i.e. retain H0
43Exercise 8.3
- To justify raising its rates, an insurance
company claims that the mean medical expense for
all middle-class families is at least 700 per
year. A survey of 100 randomly selected
middle-class families found that the mean
medical expense for the year was 670 and the
standard deviation was 140. Assuming that the
tails of the distribution of medical expenses are
not usually long, is there any evidence that the
insurance company is misinformed?
44