L11 12 Notes
L11 12 Notes
1) Binomial
2) Normal
3) Standard Normal
We will now learn to use these functions for each probability model.
Page 1 of 11
trials”. Then the probability distribution of X can be modelled as the
Binomial model with two parameters n and p. This is written as X ~
Binomial(n,p). R abbreviation for the Binomial distribution is binom.
The parameters n and p are called size and prob in R. The three R
functions for Binomial model are dbinom, pbinom and qbinom. We will
use dbinom, pbinom and qbinom as needed in the questions below.
Ans: X ~ Binomial(20,0.01)
dbinom(1,size=20,prob=0.01)
[1] 0.1652337
qbinom(0.99,size=20,prob=0.01)
[1] 2
dbinom(0:3,size=20,prob=0.01)
dbinom(0,size=50,prob=0.09)
Page 2 of 11
[1] 0.008955083
dbinom(1,size=50,prob=0.09)
[1] 0.04428338
P(X>=2)
=1 – P(X<=1)
1- pbinom(1,size=50,prob=0.09)
[1] 0.9467615
Page 3 of 11
d) As the names of the parameters already indicate, the mean and
variance of
[1] 0.1586553
[1] 0.8413447
0.8413447 - 0.1586553
[1] 0.6826894
Ans: Probability (a German woman’s height is between 161 and 173 cm)
is 0.683
The interval (161, 173) is one standard deviation from the mean.
3.2: What is the proportion of women having height upto 175 cm?
Page 4 of 11
pnorm(175, mean = 167, sd = 6)
[1] 0.9087888
Method 1:
[1] 0.09121122
Method 2:
[1] 0.09121122
[1] 190.6915
Ex 4. Inventory Management
[1] 0.7745375
[1] 0.5
4.3 The retailer wants to set his inventory level so that he is 95%
confident of not having a stockout situation. What should be his
inventory level? <Hint: Find the demand level that has a 95%
probability of not being exceeded (i.e., there is a 95% probability that the
demand will not be more than that level).>
Page 5 of 11
qnorm(0.95, mean = 120, sd = 20)
[1] 152.8971
[1] 99.22327
Alternatively,
# Define parameters
mean_score <- 80
sd_score <- 15
print(min_score)
[1] 99.22327
The Standard Normal Probability Model, also called the Standard Normal
Distribution (SND), is the Normal Probability Model with mean = 0
and sd = 1 (default values). The SND variable is usually denoted by Z.
We write Z ~ Norm(µ=0, σ2=1)
Page 6 of 11
To calculate the cumulative probability of SND variable being greater
than or equal to z use 1-pnorm(z). You can also use pnorm(z, lower.tail
= FALSE).
To find pth percentile of the SND use qnorm(p)
Data:
We want the brightness standard x such that 95% of the bulbs produced
meet (or exceed) that. In other words, 95% values are above x and 5%
values are below x. So x is 5th percentile value.
Solution:
Method 1 using ND
qnorm(0.05,mean=100,sd=10)
[1] 83.55146
z_score
[1] -1.644854
μ <- 100
σ <- 10
x <- μ + σ* z_score
Page 7 of 11
print(x)
[1] 83.55146
Ex 7: Investment Analysis
Data:
Solution:
Method 1 using ND
[1] 0.1586553
μ<- 0.12
σ<- 0.04
print(probability)
[1] 0.1586553
Interpretation: The probability that the stock's return will be less than
8% is approximately 0.1586553 or 15.86%.
Ex 8: Customer Satisfaction
Page 8 of 11
1.5. The company wants to know the proportion of customers who rate
their satisfaction above 9.
Data:
Mean (μ) = 8
Solution:
Method 1 using ND
[1] 0.2524925
mean<-8
sd<-1.5
print(probability)
[1] 0.2524925
Ex 9: Inventory Management
Data:
Mean = 50 units
Solution:
qnorm(0.98,mean=50,sd=10)
Page 9 of 11
[1] 70.53749
OR
print(inventory_level)
[1] 70.53749
Data:
Mean (μ) = 80
Solution:
qnorm(0.90,mean=80,sd=15)
[1] 99.22327
OR
print(min_score)
[1] 99.22327
Page 10 of 11
Page 11 of 11