0% found this document useful (0 votes)
12 views

Lecture 7 & 8

Uploaded by

Muntasir Gafar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

Lecture 7 & 8

Uploaded by

Muntasir Gafar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 79

es by khaled

good luck
atc) to exit full screen

Introduction to
; 2) Normal Probability Distributions

Dr. Ihab El-Khodary


Faculty of Computers and Artificial Intelligence
Cairo University
a Probability Distributions

a|
Discrete
Probability
hDistributions

Binomial |

Poisson

Hypergeometric |
a The Normal Distribution

= Bell Shaped
= Unimodal; the mode occurs at x =p f(x)
= Mean, Median and Mode are Equal
= Symmetrical about a vertical axis
through the mean (Mirror image)
= The curve has its points of o
inflection
at x = p t a; i.e. is concave
downwards if p-o <x <p +o, and H
is concave upwards otherwise
= The normal curve approaches the Mean
horizontal axis asymptotically as we = Median
proceed in either direction away = Mode
from the mean
= Area under the curve is 1
Dr. hab EbKnodary Chap 6-5
a Many Normal Distributions

By varying the parameters ) and o, we obtain


different normal distributions

Or. nab E-Knodary Chap 6-7


4 il Distribution Density Function

= z eH [20°
f(x) = N(%,4,0) o/27

Where:
x = any value of the continuous random variable
o = population standard deviation
UU = population mean
m= 3.14159
e = base of natural log = 2.71828

Dr. hab EFKnodary menae


{ 2 | The Normal Distribution Shape

f(x). Changing p shifts the


distribution left or
right.
Changing o increases
or decreases the
spread.

Dr. hab EbKhodary Sanit


2 Finding Normal Probabilities

Probability is measured by the area


under the curve

f(x) P(a< x <b)

Dr. hab E-Khodary Chap 6-10


Probability as
a Area Under the Curve
The total area under the curve is 1.0, and the curve is
symmetric, so half is above the mean, half is below

f(x) | [P(
< x—
<pc
) o
= 0.5 P(u<x<a«)=0.5

y x

P(—o0
< X <o)=1.0
Dr. hab ELKhodary Chap6-11
4 2) Empirical Rules

What can we say about the-distribution of values


around the mean? There are some general rules:
f(x)
i+10 encloses about
68% of x’s

y-lo p plo
~ 68.26%
Dr. nab EF-Khodary Chap 6-12
aA The Empirical Rule
(continued)
=» p+2ocovers about 95% of x’s
» pw+3ocovers about 99.7% of x’s

30

95.44% 99.72%

Dr. hab E-Khodary Chap 6-13


?| Importance of the Rule

e Ifa value is about 2 or more standard


deviations away from the mean in a normal
distribution, then it is far from the mean

» The chance that a value that far or farther


away from the mean is highly unlikely,
given that particular mean and standard
deviation

Dr. hab E-Knodary Chap 6-14


4aye Standard Normal Distribution

» Also known as the “z” distribution


» Mean is defined to be 0
» Standard Deviation is 1 a.
Oy
f(z) a “4
a. %
1

0 z

Values above the mean have positive z-values,


values below the mean have negative z-values
Dr, hab E-Knodary Chap6-15
, 2) The Standard Normal

» Any normal distribution (with any mean


and standard deviation combination) can
be transformed into the standard normal
distribution (z)

» Needtotransform x units into z units

Dr. hab El-Kihodary Chap 6-16


Translation to the Standard
Normal Distribution

= Translate from x to the standard normal (the


“z” distribution) by subtracting the mean of x
and dividing by its standard deviation:

Z ee
O
» Equation resca/es any normal distribution axis
from its true units (time, weight, dollars, etc.)
to the standard measure referred to as z-value.
Dr. hab El-Khodary Chap 6-17
q 2) Example

» If x is distributed normally with mean of


100 and standard deviation of 50, the z
value for x = 250 is

> X= _ 250-100 _
3.0
“Ge so SS
» This says that x = 250 is three standard
deviations (3 increments of 50 units) above
the mean of 100.

Or. hab E-Khodary Chap 6-18


a Comparing x and z units

100 250 x
0 3.0 z
Note that the distribution is the same, only the
scale has changed. We can express the problem in
original units (x) or in standardized units (z)

Dr, hab EF-Knodary Chap 6-19


2) The Standard Normal Table

» Two options:
« Giving the probability less than a desired z value
Example:
i 9772
P(z < 2.00) = .9772

.- 0 0 2.00 2
» Giving the probability from the mean (zero) up to a
desired value for z

Example:
P(0 < z< 2.00) = .4772
Dr. Ihab El-Khodary 0 2.00 Chap 6-20
a The Standard Normal Table
(continued)

The column gives the value of


z to the second decimal point
aes 0.01 0.02 ..
The row :
shows the
value of z to The value within the
the first ; table gives the
decimal point “? $772 +— probability from z = -
°° up to the desired z
P(z < 2.00) = .9772 value
Or. hab E-Khodary Chap 6-21
The Standard Normal Table
.
T =
_ (continued)
wa) = riz sal | i dy
go 2™

Normal
Deviate
z 00 01 02 03 04 05 06 07 08 09

4.0 00003

-3.1 | 0010 0009 0009 .0009 .0008 .0008 .0008 0008 .0007 .0007
-30 | 0014 0013 0013 0012 .0012 0011 0011 .0011 .0010 0010”
-29 0019 §=.OO18 OOI8 0017 .0016 0016 0015 0015 0014 0014
-28 0026 0025 0024 0023 0023 0022. .0021 0021 .0020 0019
-27 0035 0034 0033 0032 .0031 0030 .0029 .0028 0027 .0026
-216 0047 0045 0044 0043 0041 0040 .0039 0038 .0037 00%
-25 0062 .0060 .0059 0057 .0055 0054 .0052 0051 .0049 0048 chapé-22
General Procedure for
Finding Probabilities

To find P(a<x<b) when x is


distributed normally:

= Draw the normal curve for the problem


in terms of x

» Translate x-values to z-values

» Use the Standard Normal Table

Dr, hab E-Knodary Chap 6-23


| 2) Z Table example

» Suppose x is normal with mean 8.0 and


standard deviation 5.0. Find P(8 < x < 8.6)

Calculate z-values:

= —__
x-yp 8-8 ,
= —__ = 0
oO 5 |
8 86 x
z= 2% 85-8 0.12 0 0.12 z
0 S P(8 <x <8.6).
= P(0 <z<0.12)
Dr, hab EFKhodary Chap 6-24
2) Z Table example
(continued)

» Suppose x is normal with mean 8.0 and


standard deviation 5.0. Find P(8 < x < 8.6)

P(8<x <8.6) P(0 <z<0.12)

Or. hab EHAhodary Chap 6-25


di ee Finding P(0 <z < 0.12)

Standard Normal Probability P(8 <x < 8.6)


Table (Portion) = P(O <z< 0,12)

son oars
0.0 5000 .5040 .5080 -
5398 5438 5478
0.2 .5793 5832 .5871
0.3 .6179 .6217 .6255 0.00,
0.12

Dr. nab E-Mhodary ‘Chap 6-26


2) Finding Normal Probabilities

» Suppose x is normal with mean 8.0


and standard deviation 5.0.
= Now Find P(x < 8.6)

Dr. hab E-Khodary Chap 6-27


2) Finding Normal Probabilities
(continued)

» Suppose x is normal with mean 8.0


and standard deviation 5.0.
» Now Find P(x < 8.6)

P(x < 8.6)


= P(z < 0.12)
5478

Dr. ab ELKhodary 0. 1 2 Chap 6-28


2) Upper Tail Probabilities

» Suppose x is normal with mean 8.0


and standard deviation 5.0.
» Now Find P(x > 8.6)

Dr, hab E-Knodary Chap 6-.


2) Upper Tail Probabilities
(continued)

» Now Find P(x > 8.6)...


P(x > 8.6) = P(z > 0.12) = 1— P(z < 0.12)

Dr, nab E-Knodary Chap 6-30


A. Example 1

Given a standard normal distribution, find the


area under the curve that lies between
z= -1.97 and z = 0.86.

Or. thab El-Khodary Chap 6-31


4 2) Example 2

Given a standard normal distribution, find the


value of k such that P(k < z < -0.18) = 0.4197.

Dr, hab EbKnodary Chap 6-32


za» Example 2

Given aStandard normal distribution, find the


value of k such that P(k < z < -0.18) = 0.4197.

P (e <2 4-5 \4)- b-LiTt

Wa <9 in) 8 4¥)= owt

gw =o UNF
~o tye ? WN}
G (a uw)
' oct
_.

:
Dr, hab E-Khod
2) Example 3

Given a normal distribution with p = 300 and o


= 50, find the probability that x assumes a
value greater than 362.

Dr, nab E-Knodary (Chap 6-33


A Example 4

Gauges are used to reject all components


where a certain dimension is not within the
specification 1.50 + d. It is known that this
measurement is normally distributed with
mean 1.50 and standard deviation 0.2.
Determine the value d such that the
specification “covers” 95% of the
measurements.

Or. hab El-Khodary Chap 6-14


) ~~ Example 4°
o1

5 yes 5

(Gaugesj)are used to reject all components


where a certain dimension is not within the
specification 1.50 + d. It is known that this
measurement is normally distributed with | .7\
mean 1.50 and standard deviation 0.2. ~~’
Determine the value d such that the ,ot
specification “covers” 95% ofthe 4 vey
measurements we © 45
21st :
">v6 =
eli S-d aud 1std {ucss
od Yats— 3s
a 4+s |-(c ©2253 S45 2=-\4L
Or. thab E-Kbodary 2z=\ au Chap 6-34
Introduction to
Sampling Distributions

Dr. lhab El-Khodary


Faculty of Computers and Artificial Intelligence
Cairo University
AA Chapter Goals

After completing this chapter, you should be able


to:
» Define the concept of sampling error

» Determine the mean and standard deviation for the


Sampling distribution of the sample mean, xX
» Determine the mean and standard deviation for the
sampling distribution of the sample proportion, p
» Describe the Central Limit Theorem and its importance

» Apply sampling distributions for both xand p


Dr. hab EbMhodary Chap 7-2
F 2) Sampling Error

« Sample Statistics are used to estimate


Population Parameters
eg: X is an estimate of the population mean,
» Problems:
« Different samples provide different estimates of
the population parameter
« Sample results have potential variability, thus
sampling error exits

Or, hab E+-Knodary Chap 7-3


: ?| Calculating Sampling Error

» Sampling Error:
The difference between a value (a statistic)
computed from a sample and the corresponding
value (a parameter) computed from a population

Example: (for the mean)

Sampling Error = X -u
where:

X = sample mean
Lt = population mean
Dr. nab EbKhodary Chap 7-4
d 2) Review

» Population mean: Sample Mean:

U= 2
X. = eo » X i

N n
where:
py = Population mean
x = sample mean
x, = Values in the population or sample
N = Population size
n = sample size
Dr. hab ELKhodary Chap 7-5
2| Example

If the population mean isc{i = 98.6)\degrees


and a sample of n = 5 temperatures yields
a sample mean of ¢ = 99.2) degrees, then
the sampling error is

X —u= 99.2 -98.6 = 0.6 degrees

Or, nab E+ Knodary Chap 7-6


2) Sampling Errors

« Different samples will yield different sampling


errors
» The sampling error may be positive or negative
( Xx may be greater than or less than p)
» The expected sampling error decreases as the
sample size increases

Dr. Ihab El-Khodary Chap 7-7


A Sampling Distribution

» A(sampling distribution is a
distribution of the possible values
of a statistic for a given sample
size selected from a population
« In other words, it lists the
possible values that a statistic
(e.g. X) can assume and the
probability for each value
Dr. hab E-Khodary Chap 7-8
Developing a
aA Sampling Distribution
» Assume there is a population ...
» Population size N=4 Agee8
» Random variable, x,
is age of individuals
» Values of x: 18, 20,
22, 24 (years)

Dr. hab ELKhodary Chap 7-9


Developing a
a Sampling Distribution
(continued)

Summary Measures for the Population Distribution:


= 2x. P(x)
N 3
_18+20+22+24_,,| 2
% 0 :

ae > - Hw)? 2236 18 #2 22 24 X


VON | A Bc oD
Uniform Distribution

Dr. hab EbMhodary Chap 7-10


Developing a
aA Sampling Distribution
(continued)

Number of possible samples (replacement):


Developing a
4 | Sampling Distribution
: (continued)
Now consider all possible samples of size n=2

2”! Observation
18 20 22 24
18,18 18,20 18,22 18,24
20,18 20,20 20,22 20,24
22,18 22,20 22,22 22,24
24,18 24,20 24,22 24,24

Dr. Ihab El-Khodary Chap 7-12


Developing a
2) Sampling Distribution
(continued)
Sampling Distribution of All Sample Means

| 16 Sample Means Sample Means


_ Distribution ©

18 19.20 21 22 23 24
Dr. nab EbKnodary (no longer uniform) Chap 7-13
Developing a
| Sampling Distribution
} (continued)

Summary Measures of this Sampling Distribution:

2. 1841942140424
Uy = N — = 21
16

g,= Jeu
N

eS ee
=(158
16
Or. hab E+-Anodary Chap 7-14
Comparing the Population
a with its Sampling Distribution
Population Sample Means Distribution
N=4 n=2
u=21 oO= 2.236 iL=21 ©, =1.50
P (x) P(x)

18 19 20 21 22 23 24
Developing a
Sampling Distribution
aL (Another Example)
» Assume there is a population ...
» Population size N=10
» Random variable, x
» Values of x: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11

Dr. hab E-Knodary Chap 7-16


Developing a
Sampling Distribution
. (continued)

Summary Measures for the Population Distribution:

iW 9873 y 2345
6 7 8 9 10\\i X

Uniform Distribution

Or. hab E+-Anodary ‘Chap 7-17


Developing a
A Sampling Distribution
M” (continued)

Number of possible samples (without replacement):

Cc” - 10! _ 10 * 9 Q)* 8! QI as


= «2hel 2° sl
Developing
ping 2a
42) Sampling Distribution (continued)
Now consider all possible samples of size n=2_
without replacement
4 SS] x

2,3 3,4 4,6 5,9 7,9


2,4 3,5 4,7 5, 10 7, 10
2,5 3,6 4,8 5,11 7, 11
2,6 3,7 4,9 6,7 8,9
2,7 3,8 4,10 6,8 8,10
2,8 3,9 4, 11 6,9 8, 11
2,9 3, 10 5,6 6, 10 9,10
2, 10 3,14 5,7 6, 14 9, 11
2, 11 4,5 5,8 7,8 10, 11

crnucaneary 45 possible samples (sampling without replacement) cry»


Developing a
aA Sampling Distribution (continued)

23 25 34 35 #46 50 59 70 7,9 «80


24 30 35 440 47 #&§5 510 75 7,10 &5
25 35 36 45 48 #60 511 80 7,11 90
26 40 37 50 49 65 67 65 89 &5
27 #45 38 S55 410 70 68 70 810 930
28 $0 398 60 #471 #75 #69 75 8,11 9.5
29 55 310 65 56 55 610 80 9,10 9.5
2.10 60 31 70 57 GO 611 85S 911 100
211 65 45 45 58 GS 7,8 75 10,41 105

or mas eoanea _____45samplemeans cop 7.20


Developing a
2 Sampling Distribution (continued)

Sampling distribution of x:
ae) aes P(x)
4/45 5/45
2.5 1145 7.0
3.0 145 7.5 4/45 4/45
35 245 8.0 3/45
3/45
40 245 85 3/45
45 3/45 9.0 2/45 2/45
5.0 3/45 9.5 2/45
1/45
55 4/45 10.0 1/45
6.0 4/45 105
6.5 5/45

Or. Ihab E-Kinodary Ghap 7-29


Developing a
4 2) Sampling Distribution
7 (continued)

Ss‘
23 O08 34 O85 46 20 59 80 #=7,9 2.0
74 28 | 35: 20 4? Gs 470) 6 Y,0 45
25 45 36 45 48 80 511 180 7,11 8.0
26 80 37 #80 49 #125 67 #OS 8,9 0.5
27 #125 38 125 410 180 68 20 8,10 2.0
28 180 3,9 180 411 245 69 45 8,11 45
2,9 245 3,10 245 56 05 610 80 9,10 0.5
270 320 371 320 %&7 20 61 128 8411 2.0
2114 405 45 O58 58 45 7,8 O58 10,11 0.5

or mane _____4Ssamplevariances co
Developing a
aA Sampling Distribution (continued)

Sampling distribution of s?:


~
u

0.5
gEEEEEEEEL Sampling Distribution for the Sample
2.0 Variance
0.25
4.5 026

8.0 Cc 0.15
Y
12.5 a 0.1

18.0 0.05

0
24.5 0 10 70 w 40 50
Sample Variance
32.0
40.5

Or, nab E-Knodary (Chap 7-23


Developing a
| Ss ampling Distribution
(continued)

Summary Measures of this Sampling Distribution:

in) = _2.54343.5+4--+10.5 223 vee


45 4
5,= | 2 Orbs)
“ VY ON
_ {ors eee -1.9149
Developing a
Sampling Distribution es
Like any random variable, X has an expected value
and variance:

E(X) = © X Pr(X = x)=


allX

2.5(1/45) + 3(1/45) +3.5(2/45) +...+10.5(1/45) = 6.5


Var(X) = E(X*) -E(Xy
E(X*) = 2x? Pr(X =x) =
2.57(1/45)
+3? (1/45) +3.57(2/45) +...+10.57(1/45) = 45.9167
”. Var(X) = 45.9167 —6.5° = 3.6667
SD(X) = V3.6667 =1.9149
Properties of a Sampling
a 2| Distribution
» For any population,
» the average value of all possible sample means computed
from all possible random samples of a given size from the
population is equal to the population mean:

on 2 E(X) = LL Theorem 1

« The standard deviation of the possible sample means


computed from all random samples of size n is equal to
the population standard deviation divided by the square
root of the sample size:

0, = SD(X)
=
Or, nab E-Knodary Chap 7-26
2) Sampling Distribution

» Asampling distribution is a
distribution of the possible values
off a Statistic for a given sample
size selected from a population
» In other words, it lists the
possible values that a statistic
(e.g. X) can assume and the
probability for each value
Or. hab E-Khodary Chap 7-27
, ?| If the Population is Normal
If a population is normal with mean p and
standard deviation o, the sampling distribution

of X is also normally distributed with

Me=H "Oy =
an

Or. hab E-Knodary (Chap 7-28


z-value for Sampling
aA Distribution of x
= Z-value for the sampling distribution of X :

4°'|

where: X = sample mean


UU = population mean
O = population standard deviation
n = sample size

Dr. hab E-Knodary Chap 7-29


z-value for Sampling
| Distribution of x
« Z-value for the sampling distribution of X :

O = population standard deviation


n= sample size

Or, Ihab E-Knodary (Chap 7-29


2) Finite Population Correction

» Apply the Finite Population Correction if: |


» the sample is large relative to the population
(n is greater than 5% of N)
and...
« Sampling is without replacement

¢ [N=a| 2=—~o 2|jN-n


. +

Then jo,
= —.|
* Jn\N-I1 +
Vn VN=1
Or, hab E-Knodary Chap 7-30
acamping Distribution Properties

» The sample mean is an unbiased


estimator

Ux =H] Ste neJ


n \.
>|
‘ 2 Sampling Distribution Properties
- (continued)
» The sample mean is a consistent estimator
(the value of x becomes closer to p as n increases):

saat | ina “pues


x
__— Small
SNe sample size
As n increases, x
0, =0/ Vn decreases _— Larger
sample size

Or. hab E-hedary


— * Chap 7-32
a If the Population is not Normal
=» We can apply the Central Limit Theorem: Se

» Even if the population is not normal,


= ...sample means from the population will be
approximately normal as long as the sample size
is large enough
« ...and the sampling distribution will have

and

Or, nab E-Knodary Chap 7-33


2 Central Limit Theorem

the sampling
As the nt distribution
sample i becomes
size gets | almost
large . normal
enough... regardless of
shape of
population

Dr. hab EbKnodary


la) P hai

(3) Sampling dewbution off for = = 4.

(c) Sampling Gistributen of F for x = 15.

(2) Sampling derbution


of Tfor = = 30.

(e) Sampling Goributon of T for = = 80.


Dr. nab ELK nodary
(a)
Normal ne Societe a. JP

annekyu
AIA Al
Sampling Distributions of x for
n=5

Dr. hab E-Khodary


AOA Sampling Distributions of x for
n = 30 Chap 7-37
2| How Large is Large Enough?

« For most distributions, n > 30 (for


practicality n > 25) will give a sampling
distribution that is nearly normal

« For fairly symmetric distributions, n > 15 is


sufficient

« For normal population distributions, the


sampling distribution of the mean is
always normally distributed

Or. hab E-Khodary Chap 7-38


A Example

» Suppose a population has mean up = 8 and


standard deviation o = 3. Suppose a
random sample of size n = 36 is selected.

» What is the probability that the sample mean


is between 7.8 and 8.2?

Dr. hab E+-Khodary Chap 7-39


) ait Example

» Suppose a population has mean p = 8 and


standard deviation =
0 3. Suppose a
random sample of size M = 36)is selected.
wir
Net
» What is the probability that the sample mean
is between 7.8 and 8. oe)

/* “Y € %
SN 2
4" =>. S*
HO,

Or. hab E-Khodary Chap 7-39


2) Example
(continued)

Solution:

» Even if the population is not normally


distributed, the central limit theorem can be
used (n > 30)
=» ... SO the sampling distribution of X is
approximately normal
e ... with mean yp, =p= 8
o 3
= ...and standard deviation % =—~~=~,, =9°
vn V 36
Or. Ihab E+-Knodary ‘Chap 7-40
Example
(continued)
Solution (continued) -- find z-scores:

78-8 H;-H 82-8


P(7.8 <p. <8.2) =P 3 7 ——< o/ < 3//
/J36 /Vn
/

/N36
= P(-0.4<z<0.4)=|0.3108
Population Sampling Standard Normal
Distributio Distribution Distribution
2) Example 2

An electrical firm manufactures light bulbs


that have a length of life that is normally
distributed with p = 800 hrs and o = 40 hrs.
Find the probability that a random sample of
16 bulbs will have an average life of less than
775 hrs.

Or, hab E-Khedary Chap 7-42


A Example 3

183 students will be granted bachelor’s


degrees from FCI. Of these, only 154 will enter
the job market. A sample of 25 of these
graduates will be polled to determine the
starting salaries of the entire class. Find the
probability that the sample mean falls within
$500 of p, given that o = $900.

Dr. Ihab EL.Khodary Chap 7-43

You might also like