AP Statistics / Mr. Hansen
2/10/2003

Name: _________________________

Key to HW Due 2/6/03
Binomial and Geometric Random Variables

Note: Required work is shown for each problem. Additional commentary is shown in [square brackets].

8.39(a)

Although the SRS (sampling without replacement) violates independence slightly, the population is large relative to the sample. Thus the discrepancy is negligible. The other conditions of binomial distributions are satisfied:

·        X counts the # of successes in n trials

·        P(success) = p = .4, essentially unchanging from trial to trial

·        Only 2 poss. outcomes on each trial

(b)

E(X) = np = 200(.4) = 80

(c)

[The book’s answer is wrong, because the word “between” means “strictly between” unless the word “inclusive” is also present.]

P(75 < X < 85) = P(76 £ X £ 84)
    = P(X £ 84) – P(X £ 75)
    = .7428… – .258… by calc.
    = .484

(d)

P(X ³ 100) = 1 – P(X £ 99)
    = 1 – .997… by calc.
    = .0026

This is an extremely unlikely outcome to be caused by chance alone, if p = .4. We can logically conclude that there is strong evidence that p > .4. [Throughout the remainder of the course, we will make extensive use of this technique. It is as if we have a null hypothesis H0: p = .4, and an alternative hypothesis Ha: p > .4, with very strong evidence to reject H0. The P-value of the test (not to be confused with the p in the problem) is .0026, which is very low. As we discussed in class, lower is better when we are looking for evidence to reject H0.]

8.41(a)

P(no winner) = P(HHH È TTT)
    = P(HHH) + P(TTT) [since mutually exclusive cases]
    = .53 + .53 [since flips are independent]
    = .25

(b)

P(some winner) = 1 – P(no winner)
    = 1 – (answer to part (a))
    = .75

(c)

X = # of flips needed to determine a winner (note: “1 flip” means 3 people flipping once)

X is geometric since

·        X counts # of indep. trials needed to obtain success, with n undetermined

·        P(success on a trial) = p = .75, a constant

·        only 2 poss. outcomes on each trial

 

(d)

[Because I prefer to make my tables vertical, I will place the cdf (cumulative distribution function) in the third column, not the third row. Note that we cannot show the whole distribution, because the set of possible outcomes is infinite.]

 

xi

P(X = xi)

cum. probability

 

1

p = .75

P(X £ 1) = .75

 

2

qp = (.25)(.75) = .1875

P(X £ 2) = .9375

 

3

q2p = (.252)(.75) = .046875

P(X £ 3) = .984375

 

4

q3p = (.253)(.75) = .01172

P(X £ 4) = .99609375

 

5

q4p = (.253)(.75) = .00293

P(X £ 5) = .9990234375

 

[etc.]

. . .

. . .

(e)

P(X £ 2) = .9375 by table in part (d) [or by geometcdf, though you can’t say that]

Alternate method:
P(X £ 2) = 1 – P(X > 2)
    = 1 – q2 [by the formula we proved in class]
    = 1 – .252
    = .9375

(f)

P(X > 4) = 1 – P(X £ 4)
    = 1 – .99609375 [by calc. geometcdf or by table in part (d)]
    = .0039

Alternate method:
P(X > 4) = q4 [by the formula we proved in class]
    = .254
    = .0039

Note that the answer given in the back of the book for part (f) makes no sense. This was clearly a case where the graduate student was not getting enough sleep.

(g)

E(X) = 1/p [by formula in book, which you can certainly use]
    = 1/.75
    = 1.333 flips

(h)

[Key in the following:

seq(randInt(0,1)+randInt(0,1)+randInt(0,1),X,1,80,1)®L1

What we are doing is adding 3 random integers (0=head, 1=tail) to simulate coin flipping. If the sum is 0 or 3, nobody wins. By taking 80 flips, we will almost certainly have enough to simulate 25 rounds, since a round seldom requires more than a couple of flips.

Scan your list L1. Every time an entry other than 0 or 3 appears, a round has ended with somebody winning the round. Make a stemplot of the counts needed to obtain an entry that is not 0 or 3. For example, here is my L1:

{2 2 1 2 2 0 2 0 2 2 0 0 2 2 1 1 1 2 1 2 2 3 2 3 2 0 1 0 2 2 0 3 1 1 3 0 3 0 2 1 1 1 2 1 3 3 3 2 2 0 3 1 3 1 2 2 2 1 0 1 1 1 2 2 3 0 2 1 0 3 2 1 2 0 1 1 2 1 0 1}

Here are my counts of the number of flips needed to obtain something that is not a 0 or 3:

1, 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 2, 1, 1

The very next entry would have been a 5. Too bad we had to stop after only 25 rounds.

Here is the stemplot of that last sequence:

0 | 11111111111111111
0 | 2222222
0 | 3

Sample proportions are phat1 = 17/25 = .68, phat2 = 7/25 = .25, and phat3 = 1/25 = .04. These are not an exact match to the “true values” (from table above) of .75, .1875, and .046875, respectively but they are in the ballpark.

8.44(a)

If at-bats are independent, then X is geometric with parameter p = .325. [There is good empirical evidence that at-bats are indeed independent, even though sportswriters and fans tend to see “hot streaks” and “cold streaks” in hitting. This is human nature, but the so-called streaks are generally nothing more than random occurrences. In fact, it would be surprising if streaks did not occur.]

P(X = 1) = p = .325

(b)

P(X £ 3) = .692 by calc. [using geometcdf, though you can’t say that]

Alternate method:
P(X £ 3) = 1 – P(X > 3)
    = 1 – q3 [by the formula we proved in class]
    = 1 – .6753
    = .692

(c)

P(X > 4) = 1 – q4 [by the formula we proved in class]
    = 1 – .6754
    = .208

Alternate method:
P(X > 4) = 1 – P(X £ 4)
    = 1 – .792 by calc. [using geometcdf, though you can’t say that]
    = .208

(d)

E(X) = mX = 1/p [by the book’s formula]
    = 1/.325
    = 3.077

(e)

L1
possible values for X
seq(X,X,1,10,1)

L2
geometpdf(.325,L1)

L3
geometcdf(.325,L1)

1
2
3
4
5
6
7
8
9
10
[etc.]

.325
.21938
.14808
.09995
.06747
.04554
.03074
.02075
.01401
.00945
. . .

.325
.54438
.69245
.79241
.85987
.90541
.93616
.9569
.97091
.98036
. . .

(f)

[Use the formulas shown to create lists L1, L2, and L3 as shown above. (Don’t type the numbers in by hand! Ouch!) Then perform the following keystrokes:

2nd STAT PLOT
ENTER ENTER to turn Plot #1 on (make sure others are off)
¯ ® ® ENTER to turn histogram on
¯ 2nd L1 to set L1 as the Xlist
¯ 2nd L2 to set L2 as the Freq list (a feature we have not used before)
WINDOW
    Xmin=1
    Xmax=12
    Xscl=1
    Ymin=0
    Ymax=.33
    Yscl=1
    Xres=1
GRAPH

To create STAT PLOT 2, follow the same steps as above, except turn Plot #1 off and turn Plot #2 on. When defining Plot #2, set L3 as the Freq list and set Ymax=1 in the WINDOW settings. Everything else should be exactly as shown above.

Note: Do not use ZOOM 9 to display the histograms. Simply press GRAPH.]