STK110 Chapter 7
STK110 Chapter 7
Sampling
and
Sampling
Distributions
Chapter 7: Learning Objectives
Is built on a
foundation of
is built on a
foundation of
Sampling methods
• YouTube Video
https://www.youtube.com/watch?v=be9e-Q-
jC-0
Simple Random Sampling
Example:
➢ Draw numbers from a hat.
➢ Use RANDOM function on calculator.
➢ Use =RAND() function in Excel.
➢ Returns an evenly distributed random
real number greater than or equal to 0
and less than 1. A new random real
number is returned every time the
worksheet is calculated
Exercise
Draw a random sample from a population of elements using
Excel
Method:
1. Assign a random number to each of the population elements.
➢ Use the Excel function =RAND() to assign a random
number between 0 and 1.
2. Select the 𝑛 elements with the smallest random numbers by
using the sort function in EXCEL.
Remark (to ensure that the random numbers obtained do not change
after the first sort):
Turn off the automatic recalculation option prior to sorting:
Formulas Calculation Options Manual
Simple Random Sampling (SRS): Example
Draw a SRS of size 10 from the population of 200 students.
• The Excel function =RAND() assigns a random number between
0 and 1 to each of the 200 population elements
• Select the 10 students with the smallest random numbers by
using the sort function in EXCEL
You may assume the population of students are numbered as shown
below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99100
101102103104105106107108109110111112113114115116117118119120
121122123124125126127128129130131132133134135136137138139140
141142143144145146147148149150151152153154155156157158159160
161162163164165166167168169170171172173174175176177178179180
181182183184185186187188189190191192193194195196197198199200
Excel: Simple Random Sample
Simple Random Sampling: Example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200
Random sampling methods
10
Random sampling methods
Stratified random sampling Cluster sampling
11
Chapter 7: Learning Objectives
It is called a PARAMETER
Symbol is µ
14
A Point estimate
300 30
55.53%
55.71%
Standard 𝑠−𝜎
𝜎 = 𝜎2 𝑠 = 𝑠2 OR
deviation 𝜎−𝑠
𝑝−𝑝
𝑥
Proportion 𝑝 𝑝= OR
𝑛
𝑝−𝑝
= 0.0995
Question:
Calculate the probability that the average salary will be within
$500 from the population average for a sample of size 100.
A very small population is used to illustrate the principle of “all possible samples”
Introduction to Sampling Distributions
𝑦ത
Sampling Distributions
• https://www.youtube.com/watch?v=kd6ElHgAgfY
• Excel – Central Limit Theorem clearly visualized
ഥ
The Sampling Distribution of 𝒙
𝜎 𝑥ҧ
Type equation here.
𝜇 𝜎
𝑛
𝜇
𝑥ҧ
𝑥ҧ
The Central Limit Theorem
n=5 n = 15
n = 50
n = 30
The Central Limit Theorem
n=5 n = 15
n = 50
n = 30
ഥ
The Sampling Distribution of 𝒙
Let 𝑥ҧ be the sample average of a random sample of size n from
any population.
Answer:
𝜎 4 000
𝐸 𝑥 = 𝜇 = 51 800 𝜎𝑥 = = = 400
𝑛 100
Therefore,
𝜎 𝑥ҧ
Type equation here.
𝜇 𝜎
𝑛
𝜇
𝑥ҧ
𝑥ҧ
Chapter 7: Learning Objectives
n=5 n = 15
n = 50
n = 30
ഥ for the uniform distribution
The Sampling Distribution of 𝒙
𝑏−𝑎 2
𝜎=
12
n ≥ 30
Type equation here.
𝜎
𝑛
𝑎+𝑏
𝜇=
2 𝜇
Example for Central Limit Theorem
Suppose that the delivery time of pizzas has a
uniform distribution over the interval from 20 to 40
minutes.
1 1
𝑓 𝑥 = ቐ40 − 20 20 = 0.05
= for 20 ≤ 𝑥 ≤ 40
0 elsewhere
𝑎 + 𝑏 20 + 40
The average delivery time of a pizza is 𝐸 𝑥 =𝜇= = = 30
2 2
𝑏−𝑎 2
2
40 − 20 2
The standard deviation of x is: 𝑉𝑎𝑟 𝑥 = 𝜎 = =
12 12
= 33. 3ሶ
𝑆𝑡𝑑𝑒𝑣 𝑥 = 𝜎 = 33. 3ሶ = 5.7735
Example for Central Limit Theorem
Suppose that the delivery time of pizzas has a
uniform distribution over the interval from 20 to 40
minutes. Mean = 30 and standard deviation = 5.7735
𝜎 5.7735
𝜎𝑥 = = = 0.962
𝑛 36
Example for Central Limit Theorem
Suppose that the delivery time of pizzas has a
uniform distribution over the interval from 20 to 40
minutes. Mean = 30 and standard deviation = 5.773
Let 𝑥 = the average delivery time of 36 pizzas
Question:
What are the values of 𝑎1 and 𝑎2 ? Note that
the area of 0.95 represents the middle 95% of
the data
If we know that the area to the left of 𝑎1 is 0.025, we can find the
corresponding 𝑧-value of -1.96.
If we know that the area to the left of 𝑎2 is 0.975, we can find the
corresponding 𝑧-value of 1.96.
Sampling Distributions: Example
Given: x is normally distributed with 𝜇 = 60 and 𝜎 = 10.
𝑃 𝑎1 < 𝑥 < 𝑎2 = 0.95 and 𝑛 = 100.
the corresponding 𝑧-values are -1.96 and 1.96
Question:
What are the values of 𝑎1 and 𝑎2 ?
𝑎1 − 𝜇 𝑎2 − 𝜇
𝑧= 𝑧=
𝜎𝑥 𝜎𝑥
𝑎1 − 60 𝑎2 − 60
−1.96 = 1.96 =
1 1
Question:
What are the values of 𝑎1 and 𝑎2 ?
We know that the area to the left of 𝑎1 is 0.025, therefor
𝑎1 = NORM.INV(0.025, 60, 1) = 58.04
We know that the area to the left of 𝑎2 is 0.975, therefor:
𝑎2 = NORM.INV(0.975, 60, 1) = 61.96
𝑥 ≥ 𝑎: 𝑥 ≥ 𝑎 or 𝑥 ≤ −𝑎
𝑥 ≤ 𝑎: −𝑎 ≤ 𝑥 ≤ 𝑎
𝑥 ≥ 𝑎: 𝑥 ≥ 𝑎 or 𝑥 ≤ −𝑎
𝑥 ≤ 𝑎: −𝑎 ≤ 𝑥 ≤ 𝑎
𝑃 𝑥 − 𝜇 > 10
= 𝑃 𝑥 − 𝜇 > 10 + 𝑃 𝑥 − 𝜇 < −10
𝑥−𝜇 10 𝑥−𝜇 −10
=𝑃 > +𝑃 <
𝜎𝑥 25 𝜎𝑥 25
= 𝑃(𝑧 > 0.4)+𝑃 𝑧 < −0.4
= 1 − 𝑃 𝑧 < 0.4 + 𝑃 𝑧 < −0.4
= 1 − 0.6554 + 0.3446 = 0.6892.
Chapter 7: Learning Objectives
𝑁 − 𝑛 𝑝(1 − 𝑝) 𝑝(1 − 𝑝)
𝜎𝑝 = 𝜎𝑝 =
𝑁−1 𝑛 𝑛
𝜎𝑝 is also known as the standard error of the
proportion.
ഥ
Sampling Distributions of 𝒑
The sample proportion 𝑝ҧ is the point estimate of the population
proportion p
𝑥
𝑝ҧ =
𝑛
where 𝒙 = the number of elements in the sample that
possess the characteristic of interest
𝒏 = sample size
𝑛𝑝 ≥ 0.5
𝑛(1 − p) ≥ 0.5
𝜎𝑥 = 𝑛𝑝(1 − 𝑝)
𝑝(1 − 𝑝)
𝜎𝑝ҧ =
𝑛
Type equation here.
𝜇𝑥 = 𝑛𝑝
𝜇𝑝ҧ = 𝑝
𝒙
𝒙~𝒃𝒊 ഥ = ~𝒏𝒐𝒓𝒎𝒂𝒍
𝒑
𝒏
ഥ : Example
Sampling Distributions of 𝒑
The sampling distribution of 𝑝 has approximately a normal distributed for
“large” samples. A sample is “large” if
𝑛𝑝 ≥ 5
𝑛(1 − 𝑝) ≥ 5
𝑝(1−𝑝) 0.6(1−0.6)
𝜎𝑝 = = = 0.089
𝑛 30
ഥ : Example
Sampling Distributions of 𝒑
Therefore,
𝑃(0.55 < 𝑝 < 0.65)
= 𝑃 −0.56 < 𝑧 < 0.56
= 𝑃 𝑧 < 0.56 − 𝑃 𝑧 < −0.56 = NORM.S.DIST(0.56) – NORM.S.DIST(-0.56)
= 0.7123 − 0.2877
= 0.4246
ഥ : Example
Sampling Distributions of 𝒑
𝑝 − 𝑝 0.75 − 0.7
𝑧= = = 0.69006 ≈ 0.69
𝜎𝑝 0.072
Therefore,
𝑃(𝑝 > 0.75)
= 𝑃(𝑧 > 0.69)
= 1 − 𝑃(𝑧 < 0.69)
= 1 − 0.7549
= 0.2451
ഥ : Example
Sampling Distributions of 𝒑
Suppose that 70% of the students passed the re-exam.
A simple random sample of size 40 students is drawn.
Let 𝑝 = sample proportion of students that passed for 𝑛 = 40. Calculate t
such that 𝑃 𝑝 ≤ 𝑡 = 0.9.
𝑝−𝑝
𝑧=
𝜎𝑝
𝑡 − 0.7
1.28 =
0.072
𝑥 ≥ 𝑎: 𝑥 ≥ 𝑎 or 𝑥 ≤ −𝑎
𝑥 ≤ 𝑎: −𝑎 ≤ 𝑥 ≤ 𝑎
𝑃 𝑝 − 𝑝 > 0.01
= 𝑃 𝑝 − 𝑝 > 0.01 + 𝑃 𝑝 − 𝑝 < −0.01
𝑝−𝑝 0.01 𝑝−𝑝 −0.01
=𝑃 > +𝑃 <
𝜎𝑝 0.0115 𝜎𝑝 0.0115
= 𝑃 𝑧 > 0.87 + 𝑃 𝑧 < −0.87
= 1 − 𝑃 𝑧 < 0.87 + 𝑃 𝑧 < −0.87
= 1 − 0.8078 + 0.1922 = 0.3844.
Chapter 7: Learning Objectives