36.3k views
1 vote
Suppose 75% of all students taking a beginning programming course fail to get their first program to run on first submission. Consider a group of 7 such students,where each student's success is independent from the other and the chance each student fails on their first try is consistent. (Round answers to three decimal places.)

(a) If X is the number of students whose program fails on the first run, then X comes from a binomial distribution with: n = p = . The binomial probability mass function is: . Use this function to calculate probabilities. You may verify the outcome of the function using the R command dbinom(x,n,p).
(b) What is the probability exactly 6 fail on their first submissions?
(c) What is the probability 6 or less fail on their first submissions? Hint: Find the P(X≤x) in R using pbinom(x,n,p).
(d) What is the probability at least 6 fail on their first submissions?
(e) How many students should be expected to fail? μx= (f) What is the standard deviation? σx = __.

User Shiv Singh
by
4.7k points

1 Answer

0 votes

Answer:

a)
X \sim Binom(n=7, p=0.75)

b)
P(X=6)=(7C6)(0.75)^6 (1-0.75)^(7-6)=0.311

c)
P(X \leq 6) = 1-P(X>6)= 1-P(X=7)


P(X=7)=(7C7)(0.75)^7 (1-0.75)^(7-7)=0.133


P(X \leq 6) = 1-P(X>6)= 1-P(X=7)=1-0.133=0.867

d)
P(X\geq 6)=0.311 +0.133=0.444

e)
\mu_x = np = 7*0.75 = 5.25


\sigma_x = √(np(1-p))=√(7*0.75*(1-0.75))=1.146

Explanation:

Previous concepts

The binomial distribution is a "DISCRETE probability distribution that summarizes the probability that a value will take one of two independent values under a given set of parameters. The assumptions for the binomial distribution are that there is only one outcome for each trial, each trial has the same probability of success, and each trial is mutually exclusive, or independent of each other".

Solution to the problem

Part a

Let X the random variable of interest "number of students whose program fails on the first run", on this case we now that:


X \sim Binom(n=7, p=0.75)

The probability mass function for the Binomial distribution is given as:


P(X)=(nCx)(p)^x (1-p)^(n-x)

Where (nCx) means combinatory and it's given by this formula:


nCx=(n!)/((n-x)! x!)

Part b

For this case we want this probability:


P(X=6)

And replacing into the mass function we got:


P(X=6)=(7C6)(0.75)^6 (1-0.75)^(7-6)=0.311

Part c

For this case we want this probability:


P(X\leq 6)

And we can use the complement rule like this:


P(X \leq 6) = 1-P(X>6)= 1-P(X=7)


P(X=7)=(7C7)(0.75)^7 (1-0.75)^(7-7)=0.133


P(X \leq 6) = 1-P(X>6)= 1-P(X=7)=1-0.133=0.867

Part d

For this case we want this probability:


P(X\geq 6)=P(X=6) +P(X=7)


P(X=6)=(7C6)(0.75)^6 (1-0.75)^(7-6)=0.311


P(X=7)=(7C7)(0.75)^7 (1-0.75)^(7-7)=0.133


P(X\geq 6)=0.311 +0.133=0.444

Part e

For this case the expected value if given by:


\mu_x = np = 7*0.75 = 5.25

And the standard deviation is given by:


\sigma_x = √(np(1-p))=√(7*0.75*(1-0.75))=1.146

User Shubham Khatri
by
5.9k points