Computer Science and Computer Engineering 115
Solve it with the Computer!
January 2000

Lab 11: Due Tuesday, May 2, 2000

20 points.

You may not have enough time during the organized lab time to finish this exercise. You will need to go to the U.C. user room at another time to finish it.

Goal:

Study probability and expected value.

What to do before the lab:

Review probability and expected value class notes. For extra credit, find the official rules of a sweepstakes, lottery, drawing or game of chance that include possible prizes and ways of determining the probability of winning each prize.

The exercise (what to do during the lab):

Part 1. Solve the birthday problem 3, page 77. Note: we assume there are 365 days in the year. This seems more accurate than assuming 366 as done in the book. As result, the values calculated by the formulas below are slightly different than those in the text. Hint: Let P(r) be the probability that r different people all have different birthdays. Then
P(r) = (365/365)(364/365)...((366-r)/365)
That may seem difficult to calculate for larger values of r until you observe that you can use one value to calculate the next. Observe
P(r) = P(r-1)((366-r)/365)
for r > 1. If you have difficulty with these formulas, try evaluating them with r = 1, 2, 3, .. until you can see the pattern. For example:
P(1) = 365/365    as 366-r = 365 when r = 1
P(2) = (365/365)*(364/365)    as 366-r = 364 when r = 2
        = P(1)*364/365
P(3) = (365/365)*(364/365)*(363/365)    as 366-r = 363 when r = 3
        = P(2)*363/365
Important: Make sure your name appears near the top of the spreadsheet. Include groups of size 1 to 80 in your table but only print the first page of the spreadsheet and your formulas to turn in.

Also answer the following question in writing: Based on your spreadsheet, how large a group do you need in order that the probability of two people having the same birthday is at least
a. .5?
b. .7?
c. .99?

Extra Credit: (1 point)Make the number of days in a year a changable assumption. Advantage: You can compare your answers to the text using 366 day years and then change to 365 day years before printing the lab. Extra Credit: (2 points) Create a labeled x-y scatter chart showing the probabilities calculated in this part.

Part 2. Analyze a sweepstakes.

A new company, WinBig Subscription Service, is trying to decide if they want to create a new sweepstakes in order to compete with the established services that run such contests. They hope to be competitive by offering more (smaller) prizes in addition to the large main prize.

Tentatively they considering giving away a $20,000,000 grand prize and 10 first prizes of $200,000 (payable over 20 years) in addition to a large number of "instant" prizes.

To determine the potential profit, they hired a consultant who gave them a paper copy of a spreadsheet that indicated a potentially nice profit. However not all of the board members agree with some of the assumptions. They are afraid that the percentage of entries returned and other assumptions may be too optimistic. You were hired to recreate the spreadsheet so they could tinker with it and see what would happen under alternate assumptions.

See www://www.cs.plu.edu/pub/faculty/csce115/lab11.xls for a working model. Create the spreadsheet and then test it with the following assumptions:
ItemAlternate 1
Poorer response
Alternate 2
More prizes
Grand prize$20,000,000$20,000,000
1st prize$200,000$100,000
Number of 1st prizes1020
2nd prize$250$1,000
Number of 2nd prizes40100
3rd prize$50$100
Number of 3rd prizes1,00010,000
Percent of mailings returned25%30%
(You should not have to change any formulas) Turn in copies of two alternate versions of the spreadsheet printed in landscape each on one sheet of paper. Also turn in a copy of your formulas.

What to hand in:

Label each item you turn in for easy identification. Turn in printed copies of your spreadsheets and formulas from each part. (Only turn in the first page of the spreadsheet and formulas for part 1. You will need two formatted spreadsheets for part 2.) Turn in written answers to the questions in part 1. Also turn in the chart if you made one for extra credit in part 1.

4/27/00