Title: 2sided pvalues to 1sided
1Lecture 4
- 2-sided p-values to 1-sided
- Inference about the ratio of two variances
- Inference about two proportions
- Review
- Summary
- The Flow approach to problem solving
- Example
2Understanding P-values
- For a two sample t-test the p-value
is
3From 2-sided to right(left)- sided
- Given a 2-sided p-value, how do we get a 1-sided
p-value (JMP gives only the former)? - Right-sided
- if x-difference gt mu-difference (null)
right-sided p-value 2-sided p-value /2 (!!) - If x-difference lt mu-difference
(null) right-sided p-value gt 0.5, so cant
reject - Left-sided practice problem
4P-values 2-sided gt right-sided
5(No Transcript)
613.5 Inference about the ratio of two variances
- In this section we draw inference about the ratio
of two population variances. - This question is interesting because
- Variances can be used to evaluate the consistency
of processes. - It may help us decide which of the equal- or
unequal-variances t-test of the difference
between means to use. - Because variance can measure risk, it allows us
to compare risk, for example, between two
portfolios.
7Parameter and Statistic
- Parameter to be tested is s12/s22
-
- Statistic used is
- Sampling distribution of s12/s22
- The statistic s12/s12 / s22/s22 follows the
F distribution with n1 n1 1, and n2 n2 1.
8Parameter and Statistic
- Our null hypothesis is always
- H0 s12 / s22 1
9 Testing the ratio of two population variances
Example 13.6 (revisiting Example 13.1)
- (see Xm13-01)
- In order to perform a test regarding average
consumption of calories at peoples lunch in
relation to the inclusion of high-fiber cereal in
their breakfast, the variance ratio of two
samples has to be tested first.
10(No Transcript)
11Estimating the Ratio of Two Population Variances
- From the statistic F s12/s12 / s22/s22 we
can isolate s12/s22 and build the following
confidence interval
12 Estimating the Ratio of
Two Population Variances
- Example 13.7
- Determine the 95 confidence interval estimate of
the ratio of the two population variances in
Example 13.1
13Inference about the difference between two
population proportions
- In this section we deal with two populations
whose data are nominal. - For nominal data we compare the population
proportions of the occurrence of a certain event. - Examples
- Comparing the effectiveness of new drug versus
older one - Comparing market share before and after
advertising campaign - Comparing defective rates between two machines
14Parameter and Statistic
- Parameter
- When the data are nominal, we can only count the
occurrences of a certain event in the two
populations, and calculate proportions. - The parameter is therefore p1 p2.
- Statistic
- An unbiased estimator of p1 p2 is
(the difference between the sample proportions).
15 Sampling Distribution of
- Two random samples are drawn from two
populations. - The number of successes in each sample is
recorded. - The sample proportions are computed.
Sample 1 Sample size n1 Number of successes
x1 Sample proportion
Sample 2 Sample size n2 Number of successes
x2 Sample proportion
16 Sampling distribution of
- The statistic is approximately
normally distributed if n1p1, n1(1 - p1), n2p2,
n2(1 - p2) are all greater than or equal to 5. - The mean of is p1 - p2.
- The variance of is (p1(1-p1) /n1)
(p2(1-p2)/n2)
17The z-statistic
Because and are unknown the standard
error must be estimated using the sample
proportions. The method depends on the null
hypothesis
18 Testing the p1 p2
- There are two cases to consider
Case 1 H0 p1-p2 0 Calculate the pooled
proportion
Case 2 H0 p1-p2 D (D is not equal to 0) Do
not pool the data
Then
Then
19 Testing p1 p2
- Example 13.8
- The marketing manager needs to decide which of
two new packaging designs to adopt, to help
improve sales of his companys soap. - A study is performed in two supermarkets
- Brightly-colored packaging is distributed in
supermarket 1. - Simple packaging is distributed in supermarket 2.
- First design is more expensive, therefore,to be
financially viable it has to outsell the second
design.
20 Testing p1 p2
- Summary of the experiment results
- Supermarket 1 - 180 purchasers of Johnson
Brothers soap out of a total of 904 - Supermarket 2 - 155 purchasers of Johnson
Brothers soap out of a total of 1,038 - Use 5 significance level and perform a test to
find which type of packaging to use.
21(No Transcript)
22 Testing p1 p2
- Example 13.9 (Revisit Example 13.8)
- Management needs to decide which of two new
packaging designs to adopt, to help improve sales
of a certain soap. - A study is performed in two supermarkets
- For the brightly-colored design to be financially
viable it has to outsell the simple design by at
least 3.
23(No Transcript)
24 Estimating p1 p2
- Estimating the cost of life saved
- Two drugs are used to treat heart attack victims
- Streptokinase (available since 1959, costs 460)
- t-PA (genetically engineered, costs 2900).
- The maker of t-PA claims that its drug
outperforms Streptokinase. - An experiment was conducted in 15 countries.
- 20,500 patients were given t-PA
- 20,500 patients were given Streptokinase
- The number of deaths by heart attacks was
recorded.
25 Estimating p1 p2
- Experiment results
- A total of 1497 patients treated with
Streptokinase died. - A total of 1292 patients treated with t-PA died.
- Estimate the cost per life saved by using t-PA
instead of Streptokinase.
26A Review of Chapters 12 and 13
- Summary of techniques seen
- Here (Chapter 14) we build a framework that helps
decide which technique (or techniques) should be
used in solving a problem. - Logical flow chart of techniques for Chapters 12
and 13 is presented next.
27Summary of statistical inferenceChapters 12 and
13
- Problem objective Describe a population.
- Data type Interval
- Descriptive measurement Central location
- Parameter m
- Test statistic
- Interval estimator
- Required condition Normal population
28Summary - continued
- Problem objective Describe a population.
- Data type Interval
- Descriptive measurement Variability.
- Parameter s2
- Test statistic
- Interval estimator
- Required condition normal population.
29Summary - continued
- Problem objective Describe a population.
- Data type Nominal
- Parameter p
- Test statistic
- Interval estimator
- Required condition
30Summary - continued
- Problem objective Compare two populations.
- Data type Interval
- Descriptive measurement Central location
- Experimental design Independent samples
- population variances
- Parameter m1 - m2
- Test statistic Interval estimator
- Required condition Normal populations
31Summary - continued
- Problem objective Compare two populations.
- Data type Interval.
- Descriptive measurement Central location
- Experimental design Independent samples
- population variances
- Parameter m1 - m2
- Test statistic Interval estimator
- Required condition Normal populations
32Summary - continued
- Problem objective Compare two populations.
- Data type Interval.
- Descriptive measurement Central location
- Experimental design Matched pairs
- Parameter mD
- Test statistic Interval estimator
- Required condition Normal differences
d.f. nD - 1
33Problem objective?
Data type?
Data type?
Z test estimator of p1-p2
Type of descriptive measurement?
Type of descriptive measurement?
F- test estimator of s12/s22
Experimental design?
34(No Transcript)
35Identifying the appropriate technique
- Example 14.1
- Is the antilock braking system (ABS) really
effective? - Two aspects of the effectiveness were examined
- The number of accidents.
- Cost of repair when accidents do occur.
- An experiment was conducted as follows
- 500 cars with ABS and 500 cars without ABS were
randomly selected. - For each car it was recorded whether the car was
involved in an accident. - If a car was involved with an accident, the cost
of repair was recorded.
36Identifying the appropriate technique
- Example continued
- Data
- 42 cars without ABS had an accident,
- 38 cars equipped with ABS had an accident
- The costs of repairs were recorded (see Xm14-01).
- Can we conclude that ABS is effective?
37Identifying the appropriate technique
- Question 2 Is there sufficient evidence to infer
that the cost of repairing accident damage in ABS
equipped cars is less than that of cars without
ABS? - Question 3 How much cheaper is it to repair ABS
equipped cars than cars without ABS?
38Question 2 Compare the mean repair costs per
accident
Problem objective?
Describing a single population
Compare two populations
Data type?
Cost of repair per accident
Nominal
Interval
Type of descriptive measurements?
Central location
Variability
39Question 2 Compare the mean repair costs per
accident
Central location
Experimental design?
Independent samples
Matched pairs
Run the F test for the ratio of two variances.
Equal
Unequal
40Question 2 Compare the mean repair costs per
accident
- Solution continued
- m1 mean cost of repairing cars without ABS m2
mean cost of repairing cars with ABS - The hypotheses tested H0 m1 m2 0 H1 m1
m2 gt 0 - For the equal variance case we use
41Question 2 Compare the mean repair costs per
accident
- Solution continued
- To determine whether the population variances
differ we apply the F test - From JMP we have (Xm14-01)
42Question 2 Compare the mean repair costs per
accident
- Solution continued
- Assuming the variances are really equal we run
the equal-variances t-test of the difference
between two means
At 5 significance levelthere is sufficient
evidenceto infer that the cost of repairsafter
accidents for cars with ABS is smaller than the
cost of repairs for cars without ABS.
43Checking required conditions
- The two populations should be normal (or at least
not extremely nonnormal)
44Question 3 Estimate the difference in repair
costs
- Solution
- Use Estimators Workbook t-Test_2 Means (Eq-Var)
worksheet
We estimate that the cost of repairing a car not
equipped with ABS is between 71 and 651 more
expensive than to repair an ABS equipped car.