An online computer science class has an assignment to write a program that gener
ID: 3338982 • Letter: A
Question
An online computer science class has an assignment to write a program that generates the
next best move in a game of chess. Suppose that the runtimes of student programs follow a
normal distribution with mean = 15 seconds, and standard deviation = 2:5 seconds.
Hint: The Python commands scipy.stats.norm.cdf and scipy.stats.norm.ppf may be
useful for this question.
a) What is the probability that a random program has a runtime greater than 19 seconds?
b) What is the probability that a random program has a runtime between 12 and 18 seconds?
c) The TA's want to help the students complete their work faster. What would they have
to lower the average runtime to so that only 1.0% of students have runtimes over 15
seconds? Assume the standard deviation remains fixed at = 2:5 seconds.
d) The technical support staff installs a new online server for running student experiments,
and now the runtime of each program is exactly 1/5 of what it used to be. Given this new
server (but not extra TA help as in part (c)), what are the mean and standard deviation
of the new runtime distribution?
Explanation / Answer
Ans:
Given that
= 15 seconds, and standard deviation = 2.5 seconds.
a)
z=(19-15)/2.5=1.6
P(z>1.6)=1-P(z<=1.6)=1-0.9452=0.0548
b)
z(12)=(12-15)/2.5=-1.2
z(18)=(18-15)/2.5=1.2
P(-1.2<=z<=1.2)=P(z<=1.2)-P(z<=-1.2)=0.8849-0.1151=0.7699
c)P(Z>=z)=0.01
P(Z<=z)=1-0.01=0.99
z=2.33
2.33=(15-mean)/2.5
mean=9.175
d)
mean=1/5*(15)=3
std dev=1/5*(2.5)=0.5