Transcript STT 315

STT 315
This lecture is based on Chapter 5.1-5.3
Set-up
β€’ Suppose we take a random sample of size n
from a population with mean πœ‡ and standard
deviation 𝜎.
β€’ The sample mean π‘₯ will serve the purpose of
point estimator of population mean πœ‡.
β€’ Goal: To construct a 100 1 βˆ’ 𝛼 % C.I. for πœ‡.
β€’ However the procedure will depend on
whether
– the sample size n is large enough or not,
– we know the value of 𝜎 or not.
2
Large sample C.I.’s of 𝝁
3
Reminder: Sampling distribution of π‘₯
Suppose we take a random sample from a population
with mean πœ‡, and standard deviation 𝜎.
In that case, the sample mean π‘₯ has the following
properties:
 πœ‡π‘₯ = 𝐸 π‘₯ = πœ‡.
 𝜎π‘₯ =
𝜎
.
𝑛
 Furthermore, for large sample size (𝑛 β‰₯ 30)
π‘₯~𝑁 πœ‡π‘₯ , 𝜎π‘₯ ≑ 𝑁 πœ‡,
𝜎
𝑛
approximately.
4
Building a C.I. for πœ‡
β€’ If 𝑍~𝑁(0,1) then 𝑧𝛼/2
is such a number that
𝛼
𝑃 𝑍 > 𝑧𝛼 2 = .
2
β€’ Thus P βˆ’π‘§π›Ό
β€’ Since π‘₯~𝑁 πœ‡,
𝜎
𝑛
approximately, we have 𝑍 ≔
2
<𝑍<
π‘₯βˆ’πœ‡
~𝑁
𝜎 𝑛
0,1
approximately.
β€’ So working backward we find that there is roughly 1 βˆ’ 𝛼
probability that the interval π‘₯ βˆ’ 𝑧𝛼
contain πœ‡.
𝜎
2 𝑛,
π‘₯ + 𝑧𝛼
𝜎
2 𝑛
will
5
100 1 βˆ’ 𝛼 % C.I. for πœ‡
β€’ If sample size is large then the 100 1 βˆ’ 𝛼 %
approximate C.I. for πœ‡ is:
οƒ˜π‘₯
οƒ˜π‘₯
𝜎
βˆ“ 𝑧𝛼 2 ,
𝑛
𝑠
βˆ“ 𝑧𝛼 2 ,
𝑛
if std. dev. (𝜎) is known,
if std. dev. is unknown,
where π‘₯ is the sample mean , and 𝑠 is the sample
standard deviation.
β€’ If 𝑛 β‰₯ 30, we can consider the sample is large
enough.
β€’ If sample is not large enough, we need to assume
that the population is normally distributed.
β€’ We shall use TI83/84 to compute C.I.’s for πœ‡.
6
Example
A sample of 82 MSU undergraduates, the mean
number of Facebook friends was 616.95 friends with
standard deviation of 447.05 friends. Use this
information to make a 95% confidence interval for the
average number of Facebook friends MSU
undergraduates have.
β€’ Press [STAT].
β€’ Select [TESTS].
β€’ Choose 7: ZInterval….
β€’ Select with arrow keys Stats
β€’ Input the following:




𝜎: 447.05
π‘₯ : 616.95
n : 82
C-Level: 95
β€’ Choose Calculate and press [ENTER].
β€’ Answer: 95% C.I. for µ is (520.19, 713.71).
7
C.I.’s of 𝝁 for normal populations
8
Reminder: Sampling distribution of π‘₯
Suppose we take a random sample from a population
normally distributed with mean πœ‡, and standard
deviation 𝜎.
In that case, the sample mean π‘₯ has the following
properties:
 πœ‡π‘₯ = 𝐸 π‘₯ = πœ‡.
 𝜎π‘₯ =
𝜎
.
𝑛
 Furthermore, if the population is normally
distributed then
𝜎
π‘₯~𝑁 πœ‡π‘₯ , 𝜎π‘₯ ≑ 𝑁 πœ‡,
.
𝑛
9
100 1 βˆ’ 𝛼 % C.I. for πœ‡ [known 𝜎]
β€’ If the sample is from normally distributed population
with known std. dev. 𝜎, then the 100 1 βˆ’ 𝛼 % C.I.
for πœ‡ is:
𝜎
π‘₯ βˆ“ 𝑧𝛼 2
,
𝑛
where π‘₯ is the sample mean.
β€’ Use ZInterval… from TI 83/84 to compute C.I. for πœ‡
[known 𝜎].
β€’
β€’
β€’
𝜎
The margin of error: M. E. = 𝑧𝛼 2 .
𝑛
𝜎
The width of the C.I. is 2𝑧𝛼 2 = 2𝑀. 𝐸.
𝑛
𝛼
To find 𝑧𝛼 2 use: 𝑧𝛼 2 = π‘–π‘›π‘£π‘π‘œπ‘Ÿπ‘š 1 βˆ’ , 0,1
2
.
10
100 1 βˆ’ 𝛼 % C.I. for πœ‡ [known 𝜎]
Larger the std. dev. 𝜎, larger the M.E.
Larger the confidence level, larger the M.E.
Larger the sample size 𝑛, smaller the M.E.
Given the confidence level and std. dev., one
can find the optimal sample size for a
particular margin of error using the formula:
𝑧𝛼 2 𝜎 2
𝑛=
.
π‘š. 𝑒.
β€’ Always round-up for the optimal sample size
𝑛.
β€’
β€’
β€’
β€’
11
Example
The number of bolts produced each hour from a particular
machine is normally distributed with a standard deviation
of 7.4. For a random sample of 15 hours, the average
number of bolts produced was 587.3. Find a 98%
confidence interval for the population mean number of
bolts produced per hour.
β€’
β€’
β€’
β€’
β€’
Press [STAT].
Select [TESTS].
Choose 7: ZInterval….
Select with arrow keys Stats
Input the following:
 𝜎: 7.4
 π‘₯ : 587.3
 n : 15
 C-Level: 98
β€’ Choose Calculate and press [ENTER].
β€’ Answer: 98% C.I. for µ is (582.86, 591.74).
12
Example
The number of bolts produced each hour from a particular
machine is normally distributed with a standard deviation of 7.4.
For a random sample of 15 hours, the average number of bolts
produced was 587.3. Find a 98% confidence interval for the
population mean number of bolts produced per hour.
β€’ We found 98% C.I. for µ is (582.86, 591.74).
β€’ Width = 591.74- 582.86=8.88. So M.E = Width/2 = 4.44.
Suppose we want the margin of error for 98% confidence
interval for the population mean number of bolts produced per
hour to be 3.5. What is the optimal sample size?
β€’ We shall use 𝑛 =
β€’ So 𝑧𝛼
2
β€’ 𝑛=
2.326×7.4 2
3.5
𝑧𝛼 2 𝜎 2
π‘š.𝑒.
. For 98% C.I., 𝛼 = 0.02.
= 𝑧0.01 = π‘–π‘›π‘£π‘π‘œπ‘Ÿπ‘š 0.99,0,1 = 2.326.
= 24.2. So optimal sample size is 25.
13
100 1 βˆ’ 𝛼 % C.I. for πœ‡ [unknown 𝜎]
β€’ However the formula of the previous C.I. of πœ‡ cannot be
used if the std. dev. 𝜎 is unknown.
β€’ In such case, one should substitute 𝜎 by sample standard
deviation 𝑠.
β€’ However, unlike the large sample we can no longer use 𝑧distribution (i.e. 𝑁(0,1) distribution).
β€’ In that case, student’s 𝑑-distribution comes to rescue.
β€’ 𝑑-distributions are all symmetric continuous distributions
centered around 0.
β€’ A degree of freedom (𝑑𝑓) is attached to each 𝑑-distrn.
β€’ For our problem, 𝑑𝑓 = 𝑛 βˆ’ 1.
14
The concept of 𝑑𝛼
2;𝑑𝑓
β€’ If 𝑇~𝑑𝑑𝑓 then 𝑑𝛼;𝑑𝑓 is such a number that
2
𝛼
𝑃 𝑇 > 𝑑𝛼 2;𝑑𝑓 = .
2
β€’ Thus P βˆ’π‘‘π›Ό 2;𝑑𝑓 < 𝑇 < 𝑑𝛼 2;𝑑𝑓 = 1 βˆ’ 𝛼.
15
100 1 βˆ’ 𝛼 % C.I. for πœ‡ [unknown 𝜎]
β€’ If the sample is from normally distributed population
but the std. dev. is unknown, then the 100 1 βˆ’ 𝛼 %
C.I. for πœ‡ is:
𝑠
π‘₯ βˆ“ 𝑑𝛼 2;π‘›βˆ’1
,
𝑛
where π‘₯ is the sample mean, and 𝑠 is the sample
standard deviation.
β€’
β€’
𝑠
Here the margin of error is 𝑑𝛼 2;π‘›βˆ’1 .
𝑛
𝑠
The width of the C.I. is 2𝑑𝛼 2;π‘›βˆ’1 = 2𝑀. 𝐸.
𝑛
β€’ Use TInterval… from TI 83/84 to compute C.I. for πœ‡
[unknown 𝜎].
16
Example
The Daytona Beach Tourism Commission is interested in the
average amount of money a typical college student spends per
day during spring break. They survey 25 students and find that
the mean spending is $63.57 with a standard deviation of
$17.32. Develop a 97% confidence interval for the population
mean daily spending.
β€’
β€’
β€’
β€’
β€’
Press [STAT].
Select [TESTS].
Choose 8: TInterval….
Select with arrow keys Stats
Input the following:




π‘₯ : 63.57
Sx: 17.32
n : 25
C-Level: 97
β€’ Choose Calculate and press [ENTER].
β€’ Answer: 97% C.I. for µ is (55.58, 71.56).
17