Lecture 7: Continuous Random Variable: Donglei Du (Ddu@unb - Edu)
Lecture 7: Continuous Random Variable: Donglei Du (Ddu@unb - Edu)
Lecture 7: Continuous Random Variable: Donglei Du (Ddu@unb - Edu)
Donglei Du
(ddu@unb.edu)
f (x) ≥ 0
(ii) The total area under the curve defined by f (x) is 1; namely
Z ∞
f (x)dx = 1
−∞
Geometrically, the probability of [1/3, 2/3] is the area under the curve
f (x) between [1/3, 2/3] .
1 2 x
3 3 1
0.4
0.3
0.2
y
0.1
0.0
−4 −2 0 2 4
> x<-seq(-4,4,length=200)
>y<-dnorm(x,mean=0,sd=1)
> plot(x,y,type="l",lwd=2,col="red")
E[Z] = 0
V[Z] = 1
X ∼ N (µ, σ 2 ).
0.20
0.15
0.10
y
0.05
0.00
4 6 8 10 12 14 16
> mu<-10
>sigma<-2
>x<-seq(mu-3*sigma,mu+3*sigma,length=200)
>y<-dnorm(x,mean=mu,sd=sigma)
>plot(x,y,type="l",lwd=2,col="red")
E[Z] = µ
V[Z] = σ
X −µ
Z= ∼ N (0, 1)
σ
Given Z ∼ N (0, 1), then
X = µ + σZ ∼ N (µ, σ 2 )
P (0 ≤ Z ≤ 1.23) = 0.3907.
0.4
0.3
0.2
y
0.1
0.0
−4 −2 0 2 4
x
Donglei Du (UNB) ADM 2623: Business Statistics 22 / 53
R code
> mu<-1
>sigma<-0
> pnorm(1.23, mean=mu, sd=sigma)-0.5
#[1] 0.3906514
Or simply run the following code for the standard normal distribution
where µ = 0 and σ = 1
> pnorm(1.23)-0.5
#[1] 0.3906514
0.1
0.0
−4 −2 0 2 4
Donglei Du (UNB) ADM 2623: Business Statistics 24 / 53
R code
> z1<--2.15
> z2<-2.23
> mu<-0
> sigma<-1
> pnorm(z2, mean=mu, sd=sigma)-pnorm(z1, mean=mu, sd=sigma)
[1] 0.9713487
P (0 ≤ Z ≤ z) = 0.3264
0.1
0.0
−4 −2 0 2 4
x
Donglei Du (UNB) ADM 2623: Business Statistics 26 / 53
R code
>p<-0.3264
>qnorm(p+0.5)
[1] 0.9400342
0.1
0.0
−4 −2 0 2 4
x
Donglei Du (UNB) ADM 2623: Business Statistics 28 / 53
R code
>p<-0.95
>qnorm(p)
[1] 1.644854
0.1
0.0
> pnorm(1.25)-0.5
[1] 0.3943502
0.1
> pnorm(1.25)-pnorm(-1.25)
[1] 0.7887005
where
x−µ
z :=
σ
From the table, we find z = 1.05, implying that
x = µ + zσ = 50 + 1.05(8) = 58.4
0.4
0.3
0.2
y
0.1
0.0
−4 −2 0 2 4
>p<-0.853
>qnorm(p)
[1] 1.049387
where
x−µ
z :=
σ
From the table, we find z = 1.04, implying that
x = µ + zσ = 72 + 1.04(5) = 77.2
0.4
0.3
0.2
y
0.1
0.0
−4 −2 0 2 4
>p<-0.85
>qnorm(p)
[1] 1.036433
where
x−µ
z :=
σ
From the table, we find z = −1.28, implying that
x = µ + zσ = 76 − 1.28(5) = 69.6
0.4
0.3
0.2
y
0.1
0.0
−4 −2 0 2 4
>p<-0.10
>qnorm(p)
[1] -1.281552
P (1950 ≤ X ≤ 2150)
1950 − 2000 X −µ 2150 − 2000
= P ≤ ≤
100 σ 100
= P (−0.5 ≤ Z ≤ 1.5) = P (0 ≤ Z ≤ 0.5) + P (0 ≤ Z ≤ 1.5)
= 0.1915 + 0.4332 = 0.6247.
0.4
0.3
0.2
y
0.1
0.0
−4 −2 0 2 4
> z1<--0.5
> z2<-1.5
> pnorm(z2)-pnorm(z1)
[1] 0.6246553
P (r ≤ −0.23)
r−µ −0.23 − 0.00048
= P ≤
σ 0.0094
= P (Z ≤ −24) ≈ 10−127 .
For k = 1, 2, 3, we obtain 0.68, 0.95, and 99.7 from the Normal table.