Sunday, January 27, 2008

Sample midterm questions - Part 2

"Regular" questions

Questions 1 and 2 - skip

Question 3: The average number of calls received by a switchboard in a 30-minute period is 15.
a. What is the probability that between 10:00 and 10:30 the switchboard will receive exactly 10 calls?
b. What is the probability that between 13:00 and 13:15 the switchboard will receive at least two calls?
Answer:
Since this question deals with an "area of opportunity" (the 30-minute period), we obviously need to use Poisson.
For part a, we have a period (10-10:30) that is the standard 30-minute period. So,
f(x=10) = (e^-15)(15^10)/10!
Do the arithmetic or use a lookup table and you get:
f(x=10) = 0.048611
For part b, we have a 15 minute period, so the mean is 7.5 instead of 15. Also, to compute the right hand tail of f(x>=2) we take 1-f(x=0)-f(x=1).
f(x>=2) = 1 - f(x=0) - f(x=1)
= 1 - 0.0006 - 0.0041
f(x>=2)= 0.9953

Question 4: Four workers at a fast food restaurant pack the take-out chicken dinners. John packs 45% of the dinners but fails to include a salt packet 4% of the time. Mary packs 25% of the dinners but omits the salt 2% of the time. Sue packs 30% of the dinners but fails to include the salt 3% of the time. You have purchased a dinner and there is no salt.
a. Find the probability that John packed your dinner.
b. Find the probability that Mary packed your dinner.
Answer:
This scenario is a perfect application of Bayes' Theroem. We have:
P(John) = .45
P(Mary) = .25
P(Sue) = .30
P(NoSalt|John) = .04
P(NoSalt|Mary) = .02
P(NoSalt|Sue) = .03

In part a, we want to know P(John|NoSalt). Applying Bayes':
P(John|NoSalt) = P(NoSalt|John)P(John) / P(NoSalt|John)P(John)+P(NoSalt|Mary)P(Mary)+P(NoSalt|Sue)P(Sue)
= (.04)(.45) / (.04)(.45) + (.02)(.25) + (.03)(.30)
= 0.018 / (0.018 + 0.005 + 0.009)
= 0.5625

In part b, we want to know P(Mary|NoSalt). Again, applying Bayes' in the same way:
P(Mary|NoSalt) = P(NoSalt|Mary)P(Mary) / P(NoSalt|John)P(John)+P(NoSalt|Mary)P(Mary)+P(NoSalt|Sue)P(Sue)
= (.02)(.25) / (.04)(45) + (.02)(.25) + (.03)(.30)
= 0.5 / (1.8 + 0.5 + 0.9)
= 0.15625

Question 5: In a southern state, it was revealed that 5% of all automobiles in the state did not pass inspection. Of the next ten automobiles entering the inspection station,
a. what is the probability that more than three will not pass inspection?
b. Determine the mean and standard deviation for the number of cars not passing
inspection.
Answer: Since this is a case of pass/fail, we recognize this as a case for the binomial distribution and, for part a, P(x>3) = 1-P(x=0)-P(x=1)-P(x=2)-P(x=3), so we'll have to calculate P(x) for x=0,1,2, and 3 using the formula:

P(x) = [n!/(n-x)!x!] (p^x)(1-p)^(n-x) where n=10 and p=0.05

Sheesh!
I hope we get a binomial distribution table if we get a question like this!
From table E.6 in the book, I get
P(x>3) = 1 - 0.5987 - 0.3151 - 0.0746 - 0.0105
P(x>3) = 0.0011

For part b, we use the easy formulas for mean and standard deviation of a binomial distribution:
Mean = np = (10)(0.05)
Mean = 0.5
Standard Deviation = SQRT(np(1-p)) = SQRT((0.5)(1-0.05)) = SQRT(0.475)
Standard Deviation = 0.689

2 comments:

Ingodwetrust1974 said...

Hi,

I have different results for your calculations:

In part a, we want to know P(John|NoSalt). Applying Bayes':
P(John|NoSalt) = P(NoSalt|John)P(John) / P(NoSalt|John)P(John)+P(NoSalt|Mary)P(Mary)+P(NoSalt|Sue)P(Sue)
= (.04)(.45) / (.04)(.45) + (.02)(.25) + (.03)(.30)
= 1.8 / (1.8 + 0.5 + 0.9)
= 0.5625

I get the following:

1.8/(0.18+0.005+0.009)=0.927835?!

Thanks,

Alex

Eliezer said...

Alex: Thanks for the comment.

Indeed, in my application of Bayes, I used percentages instead of fractional probabilities and ended up multiplying both the numerator and denominator by 100 which canceled each other out and gave me the right answer - even though I got to it the wrong way!

You've corrected two terms in the denominator (0.005 and 0.009) but not the third term (should be 0.018) nor the numerator (should also be 0.018), so you're more "correct" than me in the application but ended up with the wrong answer.

I corrected all the terms in the blog post which you can look at now.

Thanks again for the good catch! It's this type of mistake that will cost points on the midterm. The concepts and formulas are pretty easy, but it's easy to mess up when you apply them and work out the final answer. So it may sound obvious, but be sure to check your work before turning it in.