Practice Problems for Midterm 2, Spring 2009

advertisement
Practice Problems for Midterm 2, Spring 2009
1. A careless R programmer has a 10% chance of making an error in a line of code. Assume
that the lines of code are independent, so the event that one line has and error has no
influence on the probability of an error occuring in a different line.
(a.) A short program consists of 8 lines of code. Let X be the number of lines in the short
program that contain an error. What is the distribution of X? State the name of the
distribution and the values of parameters. What is the probability that less than one
quarter of the lines contain an error?
(b.) A longer program contains 150 lines of code. Let Y be the number of lines in the
long program that contain an error. Assume that Y has an approximate Poisson
distribution. What is the appropriate value for the Poisson rate parameter λ? Using
your value of λ, how many lines of code do you expect will have errors?
(c.) You have looked through three lines of code, and none of them has an error. Now,
what is the distribution of the number of additional lines of code until you find one
with an error (including the line with an error). What is the expected number of
additional lines of code until the first with an error?
2. Let T be the time until an electronic component fails, measured in years. (T is the lifetime
of the component). Assume that T is a continuous random variable with probability density
function (pdf)
(
k exp−.5t if t ≥ 0
fT (t) =
0 if t < 0.
(a.) What value of k makes fT (t) a valid pdf? Why?
(b.) What is the cumulative distribution function (cdf) of T ? (You may express your
answer in terms of k if you were unable to find k in part (a)).
(c.) What is the probability that the component fails within the first six months (.5 years)?
(You may express your answer in terms of k if you were unable to find k in part (a))
A manufacturer sells 50 such components, each of which comes with a six-month warranty.
The lifetimes of the 50 components are independent, continuous random variables, each
with pdf fT (t). Consider the 50 components that the manufacturer sells. Let X be the
number of components that fail during the first 6 months (.5 years).
(d.) Is X discrete or continuous? Why?
(e.) What is the distribution of X? Give the name of the distribution and the numeric
values of all parameters. (You may express your answer in terms of k if you were
unable to find the value of k.) How many components does the manufacturer expect
will fail during the first 6 months?
3. On any given day, the probability of a network breakdown is 1/21. The network breakdowns
occur independently of one another.
1
(a.) We start monitoring the network on day 1 and continue monitoring the network for
day 2, day 3, day 4, etc. Let X be the day on which the first breakdown occurs. What
is the distribution of X? State the name of the distribution and numeric values of
parameters.
(b.) What is the expected day on which the first breakdown occurs? (In other words, what
is E[X]?)
(c.) We have been monitoring the network for one week, and no breakdowns have occured?
Now, what is the expected number of additional days until the first breakdown? Why?
(d.) What is the probability that no breakdowns occur in the first 5 days? What is the
probability that there is exactly 1 breakdown in the first 5 days?
(e.) The number of breakdowns in the next three weeks has an approximate Poisson distribution with rate λ = 1. What is the probability that there is at least 1 breakdown
in the next three weeks? For full credit, express your answer as a single number.
4. Normal Distribution
The average monthly balances on checking accounts of the ISU Bank are normally distributed with mean $1000 and standard deviation $500. There is a monthly fee if the
average monthly balance is below $1500.
(a.) What is the probability that a customer can avoid the monthly fee?
(b.) What is the probability that a customer can avoid the fee given that the balance on
his/her account exceeds $1000?
(c.) What is the probability that the balance of a customer is between $ 900 and $1100?
A. Able is customer at the ISU Bank, B. Baker is at a bank, whose customers have a
normally distributed balance with mean $1200 and variance 90000. The banks are independent.
(d.) What is the distribution of the difference between the balances of Able and Baker
distributed? Give an appropriate distribution and parameter(s).
(e.) What is the probability that Able has more money on his account than Baker? (use
your answer to (d))
5. Central Limit Theorem
(a.) Suppose 49% of students are in favor of a new administrative decision. The Iowa State
Daily asks 1000 randomly selected students if they are in favor of the new decision.
Assume the responses are iid Bernoulli trials. Approximate the probability that more
than 51% of the students interviewed are in favor of the new decision.
(b.) A psychologist wants to estimate the mean intelligence quotient (IQ) of the students
of a university. To do so, she takes a sample of size n of the students and measures
their IQs. Then she finds the average of these numbers. She believes that the IQs
of these students are iid random variables with a variance of 170. How big should
she choose the sample so that the (approximate) probability that her estimate differs
from the true mean by more than .2 is .02?
2
6. Random Numbers
Below are 5 iid realizations from a standard uniform (U (0, 1)) distribution.
u1 = 0.0206, u2 = 0.3611, u3 = 0.7972, u4 = 0.414, u5 = 0.1058
(a.) A continuous distribution of interest has CDF
0
if y ≤ 1
FY (y) =
1
1 − y2 if y ≥ 1
Describe how you would simulate five realizations y1 , y2 , y3 , y4 and y5 of Y with
the five uniform random numbers given above. What values y1 , . . . , y5 do you
obtain?
(b.) How would you use the five values above to generate a single realization X from
a Binomial distribution with n = 5 and p = .25. What value of X do you obtain?
(c.) How could you simulate from an Erlang distribution with k = 5 and λ = 3?
7. Please review HW 5-8 for additional examples.
3
Download