LEARNING REINFORCEMENT NO. ACTIVITY 7-1:

The Normal Probability Distribution

library(ggplot2)

PROBLEM 1

Suppose family incomes in a town are normally distributed with a mean of P25000 and a standard deviation of P6000 per month. What is the probability that a family has an income between P14,000 and P32,500?

pnorm(32500,mean=25000,sd=6000)-pnorm(14000,mean=25000,sd=6000)
## [1] 0.8609737
z1<-(32500-25000)/6000
z1
## [1] 1.25
z2<-(14000-25000)/6000
z2
## [1] -1.833333
z<-seq(from =-4,to =+4,length.out=1000)
normal<-data.frame(x=z,y=dnorm(z,mean=0,sd=1))
stdnormal<-ggplot(normal,aes(x,y))+geom_line()+labs(title="Standard Normal Distribution",y="Density",x="Z")
stdnormal+geom_ribbon(data=subset(normal,z<z1&z>z2),aes(ymax=y),ymin=0,fill="blue",alpha=0.3)

The probability that a family has an income between P14,000 and P32,500 is 86.10% or 0.8610.

PROBLEM 2

The amount of time required per individual at a bank teller’s window has been found to be approximately normally distributed with 𝜇 =130 sec and 𝜎 = 45 sec. What is the probability that a randomly selected individual will:

Problem 2a

Require less than 100 sec to complete a transaction?

pnorm(100,mean=130,sd=45)
## [1] 0.2524925
z1<-(100-130)/45
z1
## [1] -0.6666667
z<-seq(from =-4,to =+4,length.out=1000)
normal<-data.frame(x=z,y=dnorm(z,mean=0,sd=1))
stdnormal<-ggplot(normal,aes(x,y))+geom_line()+labs(title="Standard Normal Distribution",y="Density",x="Z")
stdnormal+geom_ribbon(data=subset(normal,z<z1),aes(ymax=y),ymin=0,fill="blue",alpha=0.3)

The probability that a randomly selected individual will require less than 100 seconds to complete a transaction is 25.25% or 0.2525.

Problem 2b

Spend between 2.0 and 3.0 min at the teller’s window?

pnorm(180,mean=130,sd=45)-pnorm(120,mean=130,sd=45)
## [1] 0.4546693
z1<-(180-130)/45
z1
## [1] 1.111111
z2<-(120-130)/45
z2
## [1] -0.2222222
z<-seq(from =-4,to =+4,length.out=1000)
normal<-data.frame(x=z,y=dnorm(z,mean=0,sd=1))
stdnormal<-ggplot(normal,aes(x,y))+geom_line()+labs(title="Standard Normal Distribution",y="Density",x="Z")
stdnormal+geom_ribbon(data=subset(normal,z<z1&z>z2),aes(ymax=y),ymin=0,fill="blue",alpha=0.3)

The probability that a randomly selected individual will spend between 2.0 and 3.0 minutes at the teller’s window is 45.47% or 0.4547.

PROBLEM 3

The waiters in a restaurant receive an average tip of 20 dollars per table with a standard deviation of 5 dollars. The amounts of tips are normally distributed, and a waiter feels that he has provided excellent service if the tip is more than 25 dollars. What is the probability that a waiter has provided excellent service to a table?

pnorm(25,mean=20,sd=5,lower.tail = F)
## [1] 0.1586553
z1<-(25-20)/5
z1
## [1] 1
z<-seq(from =-4,to =+4,length.out=1000)
normal<-data.frame(x=z,y=dnorm(z,mean=0,sd=1))
stdnormal<-ggplot(normal,aes(x,y))+geom_line()+labs(title="Standard Normal Distribution",y="Density",x="Z")
stdnormal+geom_ribbon(data=subset(normal,z>z1),aes(ymax=y),ymin=0,fill="blue",alpha=0.3)

The probability that a waiter has provided excellent service to a table is 15.87% or 0.1587.

PROBLEM 4

An appliance center guarantees their washing machine for a period of 1 year. The washing machine life is normally distributed with a mean of 3.7 years and a standard deviation of 1.8 years. What is the probability that a washing machine will break down during the guarantee period of 1 year?

pnorm(1,mean=3.7,sd=1.8)
## [1] 0.0668072
z1<-(1-3.7)/1.8
z1
## [1] -1.5
z<-seq(from =-4,to =+4,length.out=1000)
normal<-data.frame(x=z,y=dnorm(z,mean=0,sd=1))
stdnormal<-ggplot(normal,aes(x,y))+geom_line()+labs(title="Standard Normal Distribution",y="Density",x="Z")
stdnormal+geom_ribbon(data=subset(normal,z<z1),aes(ymax=y),ymin=0,fill="blue",alpha=0.3)

The probability that a washing machine will break down during the guarantee period of 1 year is 6.68% or 0.0668.

PROBLEM 5

A company pays its employees an average wage of 22.50 dollars an hour with a standard deviation of 2.30 dollars. If the wages are approximately normally distributed and paid to the nearest centavos:

Problem 5a

What percentage of the workers receive wages between 20 dollars and 23.50 dollars?

pnorm(23.50,mean=22.50,sd=2.30)-pnorm(20,mean=22.50,sd=2.30)
## [1] 0.5296119
z1<-(23.50-22.50)/2.30
z1
## [1] 0.4347826
z2<-(20-22.50)/2.30
z2
## [1] -1.086957
z<-seq(from =-4,to =+4,length.out=1000)
normal<-data.frame(x=z,y=dnorm(z,mean=0,sd=1))
stdnormal<-ggplot(normal,aes(x,y))+geom_line()+labs(title="Standard Normal Distribution",y="Density",x="Z")
stdnormal+geom_ribbon(data=subset(normal,z<z1&z>z2),aes(ymax=y),ymin=0,fill="blue",alpha=0.3)

The percentage of the workers that receive wages between 20 dollars and 23.50 dollars is 52.96% or 0.5296.

Problem 5b

The highest 5% of the employees have hourly wages that are greater than what amount?

qnorm(0.05,mean=22.50,sd=2.30,lower.tail = F)
## [1] 26.28316
qnorm(0.05,lower.tail = F)
## [1] 1.644854
z<-seq(from =-4,to =+4,length.out=1000)
normal<-data.frame(x=z,y=dnorm(z,mean=0,sd=1))
stdnormal<-ggplot(normal,aes(x,y))+geom_line()+labs(title="Standard Normal Distribution",y="Density",x="Z")
stdnormal+geom_ribbon(data=subset(normal,z>qnorm(0.05,lower.tail = F)),aes(ymax=y),ymin=0,fill="blue",alpha=0.3)

The highest 5% of the employees have hourly wages that are greater than 26.28 dollars.