# Solved:The first assignment in a statistical computing class involves running a short program. If past experience indicates

#### ByDr. Raju Chaudhari

May 31, 2021

The first assignment in a statistical computing class involves running a short program. If past experience indicates that 40% of all students will make no programming errors, compute the (approximate) probability that in a class of 50 students

a. At least 25 will make no errors (Hint: Normal approximation to the binomial)
b. Between 15 and 25 (inclusive) will make no errors

#### Solution

Here $X$ denote the number of students who make no errors.

$p$ be the probability of making no programming errors.

Given that $p=0.4$ and $n =50$. Thus $X\sim B(50, 0.4)$.

Mean = $\mu= n*p = 50 \times 0.4 = 20$.

sd = $\sigma= \sqrt{n*p*(1-p)} = \sqrt{50 \times 0.4 \times (1- 0.4)}=3.4641$

(a) The (approximate) probability that in a class of 50 students
at least 25 will make no errors is

 \begin{aligned} P(X\geq 25) & = 1- P(X < 25)\\ &= 1- P(X < 24.5)\\ &\quad \quad (\text{ using continuity correction})\\ &= 1-P\bigg(\frac{X-\mu}{\sigma} < \frac{24.5- 20}{3.4641}\bigg)\\ & =1-P(Z < 1.299)\\ & = 1-0.903\\ & = 0.097 \end{aligned}

(b) The (approximate) probability that in a class of 50 students between 15 and 25 (inclusive) will make no errors is

 \begin{aligned} P(15\leq X\leq 25) &= P\bigg(\frac{15- 20}{3.4641}\leq \frac{X-\mu}{\sigma} < \frac{25- 20}{3.4641}\bigg)\\ &= P(-1.4434 < Z < 1.4434)\\ & =P(Z < 1.4434)-P(Z < -1.4434)\\ & = 0.9255-0.0745\\ & = 0.851 \end{aligned}