Introduction to Probability and Statistics Eleventh Edition

MTH3003 PJJ
SEM II 2014/2015
F2F II
12/4/2015

ASSIGNMENT :25%
Assignment 1 (10%)
Assignment 2 (15%)

Mid exam :30%
Part A (Objective)
Part B (Subjective)

Final Exam: 40%
Part A (Objective)
Part B (Subjective - Short)
Part C (Subjective – Long)
CHAPTER 8
ESTIMATION (LARGE SAMPLE)
oDefinition
oTypes of estimators:
Point estimator
Interval estimator
Key Concepts
I. Types of Estimators
1. Point estimator: a single number is calculated to estimate
the population parameter.
2. Interval estimator: two numbers are calculated to form an
interval that contains the parameter.
II. Properties of Good Estimators
1. Unbiased: the average value of the estimator equals the
parameter to be estimated.
2. Minimum variance: of all the unbiased estimators, the best
estimator has a sampling distribution with the smallest
standard error.
3. The margin of error measures the maximum distance
between the estimator and the true value of the parameter.
The Margin of Error
Margin of error: The maximum error of estimation, is the
maximum likely difference observed between sample mean
x and true population mean µ, calculated as :
1.645 1.96 2.33 2.575
z  2  std error of the estimator
Key Concepts
III. Large-Sample Point Estimators
To estimate one of four population parameters when the
sample sizes are large, use the following point estimators with
the appropriate margins of error.
Example 1
• A homeowner randomly samples 64 homes similar to her
own and finds that the average selling price is $252,000
with a standard deviation of $15,000. Estimate the average
selling price for all similar homes in the city.
Point estimator of μ: x  252, 000
s
15, 000
Margin of error :  1.96
 1.96
 3675
n
64
Example 2
A quality control technician wants to estimate
the proportion of soda cans that are underfilled.
He randomly samples 200 cans of soda and finds 10
underfilled cans.
n  200
p  proportionof underfilled cans
Point estimatorof p : pˆ  x/n  10 / 200  .05
pˆ qˆ
(.05)(.95)
M argin of error :  1.96
 1.96
 .03
n
200
Key Concepts
IV. Large-Sample Interval Estimators
To estimate one of four population parameters when the
sample sizes are large, use the following interval estimators.
Example 3
A random sample of n = 50 males showed a mean average
daily intake of dairy products equal to 756 grams with a
standard deviation of 35 grams. Find a 95% confidence
interval for the population average m.
1.96
x  z 0.05 2
s
35
 7 56  1 .96

n
50
or 746.30  m  7 65.70 gram s.
7 5 6  9 .7 0
Example 4
Of a random sample of n = 150 college students, 104 of the
students said that they had played on a soccer team during
their K-12 years. Estimate the proportion of college
students who played soccer in their youth with a 98%
confidence interval.
2.33
pˆ  z 0.02 2

pˆ qˆ
n
.6 9  .0 9
104
.69 (.31)

 2 .33
150
150
o r .6 0  p  . 7 8 .
Example 5
Avg Daily Intakes
Men
Women
Sample size
50
50
Sample mean
756
762
Sample Std Dev
35
30
1.96
• Compare the average daily intake of dairy products of men
and women using a 95% confidence interval.
s12 s 22
( x1  x 2 )  z 0.05 2

n1 n2
2
2
35 30
 (756  762)  1.96

50 50
or - 18.78  m 1  m 2  6 . 78 .

 6  12 . 78
Example 6
Youth Soccer
Male
Female
Sample size
80
70
Played soccer
65
39
• Compare the proportion of male and female college students
who said that they had played on a soccer team during their
K-12 years using a 99% confidence interval. 2.575
( pˆ 1  pˆ 2 )  z 0.01 2
pˆ 1qˆ1 pˆ 2 qˆ 2

n1
n2
65 39
.81(. 19 ) .56 (. 44 )
 (  )  2 .575

 0 . 2 6  0 . 19
80 70
80
70
or 0.07  p1  p 2  0 . 45
CHAPTER 9
LARGE SAMPLE TESTS OF HYPOTHESES
PART I
Testing the single mean & single proportion
PART II
Testing the difference between two means
&
difference between two proportions
Key Concepts
I. Parts of a Statistical Test
1. Null hypothesis: a contradiction of the alternative
hypothesis
2.
Alternative hypothesis: the hypothesis the researcher wants to
support.
3.
Test statistic and its p-value: sample evidence calculated
from sample data.
4.
Rejection region—critical values and significance levels: values
that separate rejection and nonrejection of the null hypothesis
5.
Conclusion: Reject or do not reject the null hypothesis,
stating the practical significance of your conclusion.
Key Concepts
II. Errors and Statistical Significance
1.
The significance level  is the probability if rejecting H 0
when it is in fact true.
2.
The p-value is the probability of observing a test statistic
as extreme as or more than the one observed; also, the
smallest value of  for which H 0 can be rejected.
3.
When the p-value is less than the significance level  ,
the null hypothesis is rejected. This happens when the
test statistic exceeds the critical value.
4.
In a Type II error, b is the probability of accepting H 0 when it is
in fact false. The power of the test is (1  b ), the probability
of rejecting H 0 when it is false.
Key Concepts
III.Large-Sample Test
Statistics Using the z
Distribution
To test one of the four
population parameters
when the sample sizes
are large, use the
following test statistics:
statistic-hypothesized value
z
standard error of statistic
Example 1 (testing the single mean)
The daily yield for a chemical plant has averaged 880 tons
for several years. The quality control manager wants to
know if this average has changed. She randomly selects 50
days and records an average yield of 871 tons with a
standard deviation of 21 tons.
H 0 : m  880
H a : m  880
Test statistic :
x  m 0 871  880
z

 3.03
s/ n
21 / 50
Using critical value approach:
What is the critical value of z that
cuts off exactly /2 = .01/2 = .005 in the tail of the z
distribution?
For our example, z = -3.03
falls in the rejection region
and H0 is rejected at the
1% significance level.
Rejection Region: Reject H0 if z > 2.58 or z < -2.58. If the
test statistic falls in the rejection region, its p-value will be less
than a = .01.
Using p-value approach:
p - value : P ( z  3.03)  P ( z  3.03)
 2 P ( z  3.03)  2(.0012)  .0024
This is an unlikely
occurrence, which happens
about 2 times in 1000,
assuming m = 880!
Example 2 (testing the single proportion)
Regardless of age, about 20% of American
adults participate in fitness activities at least twice a week. A
random sample of 100 adults over 40 years old found 15 who
exercised at least twice a week. Is this evidence of a decline in
participation after age 40? Use  = .05.
H 0 : p  .2
H a : p  .2
Test statistic :
pˆ  p0 .15  .2
z

 1.25
p0 q0
.2(.8)
100
n
Using critical value approach:
What is the critical value of z that cuts off exactly
= .05 in the left-tail of the z distribution?
For our example, z = -1.25
does not fall in the rejection
region and H0 is not
rejected. There is not
enough evidence to indicate
that p is less than .2 for
people over 40.
Rejection Region: Reject H0 if z < -1.645. If the test statistic
falls in the rejection region, its p-value will be less than  = .05.
Example 3 (testing difference between two means)
Avg Daily Intakes
Men
Women
Sample size
50
50
Sample mean
756
762
Sample Std Dev
35
30
• Is there a difference in the average daily intakes of dairy
products for men versus women? Use a = .05.
H 0 : m1  m 2  0 (same) H a : m 1  m 2  0 (different )
Test statistic :
756  762  0
x1  x2  0

 .92
z
2
2
2
2
35
30
s1 s2


50 50
n1 n2
Using p-value approach:
p - value : P ( z  .92)  P ( z  .92)
 2(.1788)  .3576
Since the p-value is greater
than  = .05, H0 is not
rejected. There is
insufficient evidence to
indicate that men and
women have different
average daily intakes.
Example 4 (testing difference between two proportions)
Youth Soccer
Male
Female
Sample size
80
70
Played soccer
65
39
Compare the proportion of male and female college
students who said that they had played on a soccer team
during their K-12 years using a test of hypothesis.
H 0 : p1  p 2  0 (same)
H a : p1  p 2  0 (different )
Calculate pˆ 1  65 / 80  .81
pˆ 2  39 / 70  .56
x1  x2 104
pˆ 

 .69
n1  n2 150
Using p-value approach:
Youth Soccer
Male
Female
Sample size
80
70
Played soccer
65
39
Test statistic :
.81  .56
pˆ 1  pˆ 2  0

 3.30
z
1 
 1
1 1
.69(.31)  
pˆ qˆ   
 80 70 
 n1 n2 
p - value : P ( z  3 .30 )  P ( z   3 .30 )  2 (. 0005 )  .001
Since the p-value is less than  = .01, H0 is rejected. The
results are highly significant. There is evidence to indicate that
the rates of participation are different for boys and girls.
CHAPTER 10
INFERENCE FROM SMALL SAMPLE
PART I
Testing the single mean
&
difference between two means
PART II
Testing the single variance
&
ratio of two variances
Key Concepts
I. Experimental Designs for Small Samples
1. Single random sample: The sampled population
must be normal.
2. Two independent random samples: Both
sampled populations must be normal.
a. Populations have a common variance s 2.
b. Populations have different variances
3. Paired-difference or matched-pairs design: The
samples are not independent.
Key Concepts
II. Statistical Tests of Significance
1. Based on the t, F, and c 2 distributions
2. Use the same procedure as in Chapter 9
3. Rejection region—critical values and significance
levels: based on the t, F, and c 2 distributions with the
appropriate degrees of freedom
4. Tests of population parameters: a single mean, the
difference between two means, a single variance, and the
ratio of two variances
III. Small Sample Test Statistics
To test one of the population parameters when the sample
sizes are small, use the following test statistics:
Key Concepts
Testing the single mean m
The basic procedures are the same as
those used for large samples. For a test of
hypothesis:
H 0 : m  m0
H 0 : m  m0
H 0 : m  m0
H1 : m  m0
H1 : m  m0
H1 : m  m0
Two-tailed
One-tailed (lower-tail)
One-tailed (upper-tail)
Test statistic
x  m0
t
s/ n
Using p-values or a rejection
region based on t distribution
with df = n-1
Confidence Interval
For a 100(1)% confidence interval for the
population mean m:
s
x  t / 2
n
where t / 2 is the value of t that cuts off area /2
in the tail of a t - distributi on with df  n  1.
Example 1
A sprinkler (sprayer) system is designed so that the
average time for the sprinklers to activate after being
turned on is no more than 15 seconds. A test of 5
systems gave the following times:
17, 31, 12, 17, 13, 25
Is the system working as specified? Test using  = .05.
H 0 : m  15 (working as specified)
H a : m  15 (not worki ng as specified)
Solution
Data: 17, 31, 12, 17, 13, 25
First, calculate the sample mean and standard
deviation, using your calculator or the formulas in
Chapter 2.
 xi 115
x

 19.167
n
6
( x)
115
x 
2477 
n 
6  7.387
s
n 1
5
2
2
2
Data: 17, 31, 12, 17, 13, 25
Calculate the test statistic and find the rejection
region for  =.05.
Test statistic :
Degrees of freedom :
x  m 0 19.167  15
t

 1.38 df  n  1  6  1  5
s / n 7.387 / 6
Rejection Region: Reject H0 if t
> 2.015. If the test statistic falls in
the rejection region, its p-value will
be less than  = .05.
Data: 17, 31, 12, 17, 13, 25
Compare the observed test statistic to the rejection
region, and draw conclusions.
H 0 : m  15
H a : m  15
Test statistic : t  1.38
Rejection Region :
Reject H 0 if t  2.015.
Conclusion: For our example, t = 1.38 does not fall in
the rejection region and H0 is not rejected. There is
insufficient evidence to indicate that the average
activation time is greater than 15.
Testing the difference between two means (Independent Samples)
• As in Chapter 9, independent random samples of size n1
and n2 are drawn from population 1 and population 2
2
with means m1 dan m2,and variances s 12 and s 2 .
• Since the sample sizes are small, the two populations
must be normal
 The basic procedures are the same as those used for
large samples. For a test of hypothesis:
H 0 : m1  m 2   0 H 0 : m1  m 2   0
H 0 : m1  m 2   0
H1 : m1  m 2   0 H1 : m1  m 2   0
H1 : m1  m 2   0
Two-tailed
One-tailed (upper-tail)
One-tailed (lower-tail)
Interval Estimate of m1 - m2:
Small-Sample Case (n1 < 30 and/or n2 < 30)
• Interval Estimate with s 2 Unknown
s 12  s 22
s 12  s 22
x1  x2  t 2;df s x1  x2
sx1  x2
1 1
 s   
 n1 n2 
2
2
2




n

1
s

n

1
s
1
2
2
s2  s2  1
p
n1  n2  2
s x1  x2
df 
s
2
1
 s12 s22 
   
 n1 n2 
s
2
1
n1
n1  s22 n2
 n  1 s
2
1
2
2

2
n2
 n
2
2

 1
Test Statistics (
s 12  s 22
)
• Instead of estimating each population variance separately,
we estimate the common variance with
2
2
(
n

1
)
s

(
n

1
)
s
2
1
2
2
s  1
n1  n2  2
• And the resulting test statistic,
t
x1  x2    0
1 1
s   
 n1 n2 
2
has a t distribution with n1+n2-2 degrees of freedom.
Test Statistics (cont’d)
• How to check the reasonable equality of variance
assumption?
Rule of Thumb
2
larger s
3
2
smaller s
2
larger s
3
2
smaller s
Assume that the
variance are equal
Do Not Assume that
the variance are equal
Test Statistics ( s
2
1
 s 22
)
• If the population variances cannot be assumed equal,
the test statistic is
x1  x2
t
s12 s22

n1 n2
• It has an approximate t distribution with degrees of
freedom of
2
s
s 
  
n1 n2 

df  2
( s1 / n1 ) 2 ( s22 / n2 ) 2

n1  1
n2  1
2
1
2
2
Confidence Interval ( s
2
1
 s 22
)
• You can also create a 100(1-)% confidence
interval for m1-m2.
( x1  x2 )  t / 2
1 1
s   
 n1 n2 
2
2
2
(
n

1
)
s

(
n

1
)
s
1
2
2
with s 2  1
n1  n2  2
Remember the three
assumptions:
1. Original populations
normal
2. Samples random and
independent
3. Equal population
variances.
Example 2
Two training procedures are compared by measuring the time
that it takes trainees to assemble a device. A different group of
trainees are taught using each method. Is there a difference in
the two methods? Use  = 0.01.
Time to Assemble Method 1
Method 2
Sample size
10
12
Sample mean
35
31
Sample Std Dev
4.9
4.5
Solution
Hypothesis
H 0 : m1  m 2  0
H 0 : m1  m 2  0
Equality of Variances Checking
larger s 2
4.92 24.01

 1.186  3

2
2
20.25
smaller s
4.5
Test Statistics
x1  x2  0
t
1
2 1
s   
 n1 n2 
Calculate :
2
2
(
n

1
)
s

(
n

1
)
s
1
2
2
s2  1
n1  n2  2
9( 4.9 2 )  11( 4.52 )

 21.942
20
t
35  31
1 1
21.942  
 10 12 
 1.99
Using critical value approach:
What is the critical value of t that cuts off exactly
/2 = .01/2 = .005 in the tail of the t distribution?
Critical value:
t 2;df t0.01 2; 20 2.845
For our example, t = 1.99
falls in the rejection region
and H0 is rejected at the
1% significance level.
Rejection Region: Reject H0 if t > 2.845 or t < -2.845. If the
test statistic falls in the rejection region, its p-value will be less
than  = .01
The Paired-Difference Test (dependent samples)
•Sometimes the assumption of independent
samples is intentionally violated, resulting in a
matched-pairs or paired-difference test.
•By designing the experiment in this way, we can
eliminate unwanted variability in the experiment
by analyzing only the differences,
di = x1i – x2i
•to see if there is a difference in the two population
means, m1-m2.
Example 3
Car
1
2
3
4
5
Type A
10.6 9.8
12.3 9.7
8.8
Type B
10.2 9.4
11.8 9.1
8.3
• One Type A and one Type B tire are randomly assigned to
each of the rear wheels of five cars. Compare the average
tire wear for types A and B using a test of hypothesis.
H 0 : m1  m 2  0
H a : m1  m 2  0
• But the samples are not
independent. The pairs of
responses are linked because
measurements are taken on the
same car.
The Paired-DifferenceTest
To test H 0 : m1  m 2  m 0 we test H 0 : m d  m 0
using the test statistic
d  m0
t
sd / n
where n  number of pairs, d and sd are the
mean and standard deviation of the difference s, d i .
Use the p - value or a rejection region based on
a t - distributi on with df  n  1.
Solution
Car
1
2
Type A
10.6 9.8
12.3 9.7
8.8
Type B
10.2 9.4
11.8 9.1
8.3
Difference
.4
.5
.5
.4
3
4
.6
5
H0 : md  0
Ha : md  0
 di
d 
 .48
n
Calculate
sd 
2



d
i
d2 
i
n 1
n
 .0837
Test statistic :
d 0
.48  0
t

 12.8
sd / n .0837 / 5
Solution
Car
1
2
Type A
10.6 9.8
12.3 9.7
8.8
Type B
10.2 9.4
11.8 9.1
8.3
Difference
0.4
0.5
0.5
0.4
3
4
0.6
5
Rejection region: Reject
H0 if |t| > 2.776.
Conclusion:
Since t table= 12.8, H0 is
rejected. There is a
difference in the average
tire wear for the two types
of tires.
Confidence interval (dependent samples)
You can construct a 100(1-)% confidence interval
for a paired experiment using
d  t / 2
sd
n
Testing a single variance
To test H 0 : s 2  s 02 versus H1 : one or two tailed
we use the test statistic
c2 
(n  1) s 2
s
2
0
with a rejection region based on
a chi - square distributi on with df  n  1.
Confidence interval :
(n  1) s 2
c / 2
2
s 
2
(n  1) s 2
c
2
(1 / 2 )
Example 4
A cement manufacturer claims that his cement has a
compressive strength with a standard deviation of 10
kg/cm2 or less. A sample of n = 10 measurements
produced a mean and standard deviation of 312 and 13.96,
respectively. Do these data produce sufficient evidence to
reject the manufacturer’s claim? Use  = .05
A test of hypothesis:
H0: s2 = 100 (claim is correct)
H1: s2 > 100 (claim is wrong)
uses the test statistic:
2
2
(
n

1
)
s
9
(
13
.
96
)
2
c 

 17.55
2
10
100
Rejection region:
Reject H0 if c2  16.919
  .05.
Conclusion:
Since c2= 17.55, H0 is
rejected. The standard
deviation of the cement
strengths is more than
10.
Testing the ratio of two variances
H 0 : s 12  s 22
H1 : one or two tailed
We use the test statistic
s12
F  2 where s12 is the larger of the two sample variances .
s2
with a rejection region based on an F distributi on with
df1  n1  1 and df 2  n2  1.
Confidence interval :
s12 1
s 12 s12
 2  2 Fdf2 ,df1
2
s2 Fdf1 ,df2 s 2 s2
Example 5
An experimenter has performed a lab experiment
using two groups of rats. He wants to test
H0: m1 = m2, but first he wants to make sure that the
population variances are equal.
Standard (2)
Experimental (1)
Sample size
10
11
Sample mean
13.64
12.42
Sample Std Dev 2.3
5.8
Preliminar y test :
H 0 : s 12  s 22 versus H1 : s 12  s 22
Solution
Standard (2) Experimental (1)
Sample size
10
11
Sample Std Dev
2.3
5.8
H0 : s  s
2
1
2
2
H1 : s 12  s 22
Test statistic :
s12 5.8 2
F 2 
 6.36
2
s 2 2 .3
We designate the sample with the
larger standard deviation as sample
1, to force the test statistic into the
upper tail of the F distribution.
Solution
H 0 : s 12  s 22
H1 : s 12  s 22
Test statistic :
s12 5.8 2
F 2 
 6.36
2
s 2 2 .3
The rejection region is two-tailed, with  = .05, but
we only need to find the upper critical value, which
has /2 = .025 to its right.
From Table 6, with df1=10 and df2 = 9, we reject H0 if
F > 3.96.
CONCLUSION: Reject H0. There is sufficient
evidence to indicate that the variances are unequal.
Do not rely on the assumption of equal variances for
your t test!