Question one

Assume that birth weights of Omani new born babies are normally distributed with mean 3 kg and standard deviation 0.25 kg.

  1. What is the probability that the weight of a newborn is between 2.5 and 3.75 kg?

  2. A new born with too low birth weight is considered at risk. If it is reported that 1% of Omani newborn babies are at risk, what is the weight at which a baby is considered at risk?

  3. How many babies should be delivered to be 95% sure that at least one will be at risk?

  4. Out of 600 newborns, what is the probability that more than 2 and at most 12 will be at risk? (Show all the steps)

Solution Question one

Let X = the weight of a newborn

\[X \sim N(\mu=3kg,~~ \sigma=0.25kg)\]

  1. the probability that the weight of a newborn is between 2.5 and 3.75 kg

By Hand:

\[P(2.5<X<3.75) = P(Z<\frac{(3.75-3)}{0.25}) - P(Z<\frac{(2.5-3)}{0.25}) =P(Z<3)-P(Z<-2)=0.9986501-0.02275013=0.9759\]

By R:

a <- pnorm(3.75, 3, 0.25, lower.tail = TRUE)- pnorm(2.5, 3, 0.25, lower.tail = TRUE) 

cat("the probability that the height of a randomly selected student will lie between 163 to 168 cm is: ", a)
## the probability that the height of a randomly selected student will lie between 163 to 168 cm is:  0.9759
  1. the weight at which a baby is considered at risk

By Hand:

\[P(X<x_0) = 0.01 = P(Z< -2.418413)\]

\[X=\sigma Z+\mu = 0.25(-2.418413)+3=2.395397 ~~ kgs\]

By R:

x0 <- qnorm(0.005, 3, 0.25, lower.tail = TRUE)

cat("the weight at which a baby is considered at risk is: ", x0)
## the weight at which a baby is considered at risk is:  2.356043
  1. How many babies should be delivered to be 95% sure that at least one will be at risk?

By Hand:

\[p=0.01,~~ q=0.99,~~ n=?~~ But, at ~~ 95\% ~~ z_{\alpha/2}=1.96\] \[\mu=np=0.01n~~~~~~~\sigma=\sqrt{npq}=\sqrt{n(0.01)(0.99)} \] Let X=New born babies

\[P(X\ge1)=0.95~~and~~X=z\sigma+\mu\longrightarrow 1=1.96\sqrt{(0.0099n)}+0.01n\] \[0.0001n^2-0.05803184n+1=0 \longrightarrow n=\{18,563\}~~ babies\] (d) Out of 600 newborns, what is the probability that more than 2 and at most 12 will be at risk? (Show all the steps)

By Hand:

\[n=600, p=0.01, q=0.99, \mu=6, \sigma=\sqrt{(600)(0.01(0.99)}=2.437212\] \[P(2<X<12) = P(-1.64122<Z<2.46183) = P(Z<2.46183) - P(Z<-1.64122)=0.9426\] By R:

d <- pnorm(12, 6, 2.437212, lower.tail = TRUE)- pnorm(2, 6, 2.437212, lower.tail = TRUE) 

cat("the probability that more than 2 and at most 12 will be at risk is: ", d)
## the probability that more than 2 and at most 12 will be at risk is:  0.9427126

Question two

The time spent playing video game per week by middle-school students has a normal distribution with mean 23 hours and the 95% of the data range from 16 to 30 hours. If the number of hours of playing video game per week exceeds the upper limit of this interval, the student is considered a game addicted.

  1. Use the empirical rule to show that \(\sigma =3.5\).

  2. If a student is selected randomly from this population, what is the probability that this student is a game addicted?

  3. What is the probability that the time spent playing video game per week for a randomly selected student is less than 1.2 standard deviation above the mean?

  4. What is the probability that the total time spent playing video game per week for 5 randomly selected students is between 80 and 150 hours?

Solution Question two

Let X = time spent playing video game

\[X \sim N(\mu=30,~~ \sigma=?)~~ \forall ~~ X>30 \longrightarrow ~~ Addict\]

  1. Use the empirical rule to show that \(\sigma =3.5\).

By Hand:

Using the empirical rule

\[95\%~~CI~~\longrightarrow Z_{\alpha/2}=1.96\] \[X+1.96\sigma=30;~~X-1.96\sigma=16~~ \longrightarrow\sigma=3.571429\approx 3.5\] \[\sigma= \frac{Range}{4}=\frac{30-16}{4}=3.5\]

By R:

Max=30
Min=16
cv=qnorm(0.975,0,1,lower.tail = TRUE)
sigma=(Max-Min)/(2*cv)

cat("Sigma is: ", sigma)
## Sigma is:  3.571494
  1. If a student is selected randomly from this population, what is the probability that this student is a game addicted?

By Hand:

\[P(X>30)=1-P(P<30)=P(Z<0)=0.5\] By R:

b <- pnorm(30, 30, 3.5, lower.tail = TRUE)

cat("the probability that this student is a game addict is: ", b)
## the probability that this student is a game addict is:  0.5
  1. What is the probability that the time spent playing video game per week for a randomly selected student is less than 1.2 standard deviation above the mean?

By Hand:

\[P(X<(\mu+1.2\sigma))=P(X<(30+1.2*3.5))=P(X<34.2)=P(Z<1.2)=0.8849\] By R:

c <- pnorm(34.2, 30, 3.5, lower.tail = TRUE) # c <- pnorm(1.2, 0, 1, lower.tail = TRUE) 

cat("the probability that the time spent playing video game per week for a randomly selected student is less than 1.2 standard deviation above the mean is: ", c)
## the probability that the time spent playing video game per week for a randomly selected student is less than 1.2 standard deviation above the mean is:  0.8849303
  1. What is the probability that the total time spent playing video game per week for 5 randomly selected students is between 80 and 150 hours?

By Hand:

\[n=5;\mu=30;\sigma=3.5; P(80<X<150)=? \longrightarrow \mu_5=5*30=150;\sigma_5=5*3.5=17.5\] \[P(80<X<150)=P\left(\frac{80-150}{17.5}<Z<\frac{150-150}{17.5}\right)=P(-4<Z<0)=0.5\]

By R:

d <- pnorm(150, 150, 17.5, lower.tail = TRUE)- pnorm(80, 150, 17.5, lower.tail = TRUE) 

cat("the probability that the total time spent playing video game per week for 5 randomly selected students is between 80 and 150 hours is: ", d)
## the probability that the total time spent playing video game per week for 5 randomly selected students is between 80 and 150 hours is:  0.4999683

Question three

A vending machine automatically pours soft drinks into cups. The amount of soft drink dispensed into a cup is normally distributed with mean of 7.6 oz and standard deviation of 0.4 oz.

  1. What is the probability that the machine will overflow an 8 oz cup?

  2. What is the probability that the amount dispensed by the machine is between 7.2 and 8.0 oz?

  3. What is the probability the average amount dispensed in a random sample of 9 cups is less than 7.4 oz?

  4. Use normal approximation to binomial to find the probability that in a random sample of 19 cups 5 or more will not overflow an 8 oz cup?

Solution question three

Let X=Soft drink dispensed

\[\mu=7.6,~~ \sigma=0.4\] (a) What is the probability that the machine will overflow an 8 oz cup?

By Hand:

\[P(X>8)=1-P(X<8)=1-P\left(Z<\frac{8-7.6}{0.4}\right)=1-P(Z<1)=0.1586\]

By R:

a <- pnorm(8, 7.6, 0.4, lower.tail = FALSE) 

cat(" the probability that the machine will overflow an 8 oz cup is: ", a)
##  the probability that the machine will overflow an 8 oz cup is:  0.1586553
  1. What is the probability that the amount dispensed by the machine is between 7.2 and 8.0 oz?

By Hand:

\[P(7.2<X<8.0)=P(X<8)-P(X<7.2)=P\left(Z<\frac{8-7.6}{0.4}\right)-P\left(Z<\frac{7.2-7.6}{0.4}\right)=P(Z<1)-P(Z<-1)=0.6827\]

By R:

b <- pnorm(8, 7.6, 0.4, lower.tail = TRUE)-pnorm(7.2, 7.6, 0.4, lower.tail = TRUE) 

cat(" the probability that the amount dispensed by the machine is between 7.2 and 8.0 oz is: ", b)
##  the probability that the amount dispensed by the machine is between 7.2 and 8.0 oz is:  0.6826895
  1. What is the probability the average amount dispensed in a random sample of 9 cups is less than 7.4 oz?

By Hand:

\[n=6,~~ \sigma_{\bar{x}}=\frac{\sigma}{\sqrt{n}}=0.1633 \longrightarrow P(\bar{X}<7.4) = P(Z<-1.2247) = 0.1103\] By R:

c <- pnorm(7.4, 7.6, 0.1633, lower.tail = TRUE) 

cat(" the probability the average amount dispensed in a random sample of 9 cups is less than 7.4 oz is: ", c)
##  the probability the average amount dispensed in a random sample of 9 cups is less than 7.4 oz is:  0.1103366
  1. Use normal approximation to binomial to find the probability that in a random sample of 19 cups 5 or more will not overflow an 8 oz cup?

By Hand:

\[n=19, p=0.8414,~~ \longrightarrow \mu=np=15.9866, ~~ \sigma = \sqrt{npq}=1.5923\] \[P(X\ge5)=1-P\left(Z < \frac{5-15.9866}{1.5923}\right)=1-P(Z<-6.9)=1\] By R:

d <- pnorm(5, 15.9866, 1.5923, lower.tail = FALSE) 

cat(" the probability that in a random sample of 19 cups 5 or more will not overflow an 8 oz cup is: ", d)
##  the probability that in a random sample of 19 cups 5 or more will not overflow an 8 oz cup is:  1

Question four

Suppose the heights of the students of SQU are normally distributed with mean 165cm and standard deviation \(\sigma=5cm\).

  1. What is the probability that a randomly selected student will be taller than 170 cm?

  2. What is the probability that the height of a randomly selected student will lie between 163 to 168 cm?

  3. What is the probability that the height of a randomly selected student will exceed 175 cm given that he is taller than 170 cm?

  4. Find the height below which 6% of the height of the student fall.

  5. What is the probability that the mean height of 10 selected students will lie between 164 to 166 cm?

  6. Suppose you did not know that student’s height had a normal distribution. If you draw samples of size 40 from the distribution, what can you say about the distribution of sample mean \(\bar{x}\)?

Solution four

Let X = heights of the students at SQU

\[X \sim N(\mu=165cm,~~ \sigma=5cm)\]

  1. the probability that a randomly selected student will be taller than 170 cm.

By Hand:

\[P(X>170) = P(Z>\frac{(170-165)}{5})=P(Z>1)=1-P(Z<1)=1-0.8413=0.1587\]

By R:

a <- 1-pnorm(170, 165, 5, lower.tail = TRUE) # a <- pnorm(170, 165, 5, lower.tail = FALSE)

cat("the probability that a randomly selected student will be taller than 170 cm is: ", a)
## the probability that a randomly selected student will be taller than 170 cm is:  0.1586553
  1. the probability that the height of a randomly selected student will lie between 163 to 168 cm.

By Hand:

\[P(163<X<168) = P(Z<\frac{(168-165)}{5}) - P(Z<\frac{(163-165)}{5}) =P(Z<0.6)-P(Z<-0.4)=0.7257-0.3446=0.3811\]

By R:

b <- pnorm(168, 165, 5, lower.tail = TRUE)- pnorm(163, 165, 5, lower.tail = TRUE) 

cat("the probability that the height of a randomly selected student will lie between 163 to 168 cm is: ", b)
## the probability that the height of a randomly selected student will lie between 163 to 168 cm is:  0.3811686
  1. the probability that the height of a randomly selected student will exceed 175 cm given that he is taller than 170 cm.

By Hand:

\[P(X>175 | X>170) = \frac{P(Z>\frac{(175-165)}{5})}{P(Z>\frac{(170-165)}{5})} =\frac{1-P(Z<2)}{1-P(Z<1)}=\frac{0.02275013}{0.1586553}=0.1433934\]

By R:

c <- pnorm(175, 165, 5, lower.tail = FALSE)/pnorm(170, 165, 5, lower.tail = FALSE) 

cat("the probability that the height of a randomly selected student will exceed 175 cm given that he is taller than 170 cm is: ", c)
## the probability that the height of a randomly selected student will exceed 175 cm given that he is taller than 170 cm is:  0.1433935
  1. the height below which 6% of the student fall.

By Hand:

\[P(X<x_0) = 0.06 = P(Z< -1.5548)\]

\[X=\sigma Z+\mu = 5(-1.5548)+165=157.226 ~~ cm\]

By R:

d <- qnorm(0.06, 165, 5, lower.tail = TRUE)

cat("the height below which 6% of the students fall is: ", d)
## the height below which 6% of the students fall is:  157.2261
  1. the probability that the mean height of 10 selected students will lie between 164 to 166 cm.

By Hand:

\[P(164<\bar{X}<166) = P(Z<\frac{(166-165)}{\frac{5}{\sqrt{10}}}) - P(Z<\frac{(164-165)}{\frac{5}{\sqrt{10}}}) =P(Z<0.63)-P(Z<-0.63)=0.7364554-0.2635446=0.4729108\]

By R:

e <- pnorm(166, 165, 5/sqrt(10), lower.tail = TRUE)- pnorm(164, 165, 5/sqrt(10), lower.tail = TRUE) 

cat("the probability that the mean height of 10 selected students will lie between 164 to 166 cm is: ", e)
## the probability that the mean height of 10 selected students will lie between 164 to 166 cm is:  0.4729107
  1. Suppose you did not know that student’s height had a normal distribution. If you draw samples of size 40 from the distribution, what can you say about the distribution of sample mean \(\bar{x}\)

By Hand:

\[\mu=165, \sigma=5, n=40 \longrightarrow E(X)=E(\bar{X})=\mu~~\sigma_{\bar{X}}=\frac{\sigma}{\sqrt{n}}:\] \[X \sim N(\mu, \sigma)=N(165, 5),~~ by~~the~~CLT~~\bar{X}\sim N(\mu, \frac{\sigma}{\sqrt{n}})=N(165, 1.58)\]