Solutions to HW 5
*Extra #2 Suppose that 48% of the population will vote for Bush. (By
the time you do this, you'll know what the truth is. Maybe.) A random sample
of 1000 people is taken with replacement. Let X be the number of people
in the sample who will vote for Bush. (Note: "with replacement" means that
when a person is selected, they are put back in the pool and can, theoretically,
be selected again.)
a) What distribution does X have? Why? Why
did I specify that the sample of people is to be taken with replacement.
X is binomial. Why?
1) fixed sample size, n = 1000
2) trials have only two outcomes that can be classified
as "success" or "fail": "Bush" or "not Bush"
3) Probability of success is the same at each trial; p
= .48
4) trials are independent (as long as people's answers
to our question are not influenced by their knowledge of previous answers.)
If we did not take people with replacement, then the probability of a success
would change with each trial because the size of the population form which
we're drawing is decreasing.
b) Will the normal approximation provide a suitable
approximation of the exact probabilities here? Why?
Check if np and n(1-p) > 10. np = 1000*.48 = 480. n*(1-p)
= 520. Both are bigger than 10 and so the normal approximation will
work.
c) Find the probability that more than 50% of the sample
will vote for Bush.
Need E(X) = 480 and SD(X )= sqrt(1000*.48*.52) = 15.80
50% of the sample is 500 people, so we're asked to find
P(X > 500) = P(Z > (500 -480)/15.8) = P(Z > 1.27) = 1-P(Z <
1.27) approximately equals .898 (from the table.)
d) Find the probability that less than 45% of the sample
will vote for Bush.
45% of 1000 is 450 people, so
P(X < 450) = P( Z < (450-480)/15.8) = P( Z < -1.90) = .029
*Extra #3
In our in-class census, the results of a quesiton asked about whether
people support Bush came out as follows:
Bush?
|
No
|
Undecided
|
Yes
|
Female
|
25
|
17
|
10
|
Male
|
28
|
16
|
14
|
a) Suppose we select a student at random from this group. Let X =
-1 if the student does not support Bush, 0 if undecided, and 1 if they do
support. Let Y = 1 if the student is female, 0 if male. Write
a table of f(x,y), the joint distribution of X and Y.
X\Y
|
1
|
0
|
-1
|
.2272
|
.2545
|
0
|
.1545
|
.1454
|
1
|
.0909
|
.1273
|
b) Write tables for f(x) and f(y), the marginal distributions
of X and Y. (That's two tables; one for X, one for Y.)
x
|
f(x)
|
-1
|
.2272+.2545=.4817
|
0
|
.2999
|
1
|
.2182
|
y
|
f(y)
|
0
|
.2545+.1454+.1273=.5272
|
1
|
.4726
|
c) Find P(X>0, Y=1)
P(X > 0, Y = 1) = P(X = 1, Y = 1) = .0909
d) Find E(X).
E(X) = -1*.4817 + 0*.2999 + 1 *.2182 = -.2635
e) Are X and Y independent?
Check whether f(x,y) = f(x)*f(y) for ALL combinations of x and y.
f(-1, 1) = .2272
f(x=-1) = .4817
f(y=1) = .4726
f(x=-1)*f(y=1) = .4817*.4726 = .2277
This is pretty close to .2272. Some of you might say that they need
to be exactly equal and conclude that they are not independent. Otherwise
might say that, given these were "real" data, that might be close enough.
Both answers are acceptable. But if you said "close enough" you have
to keep checking the other values:
f(-1,0) = .2545
f(x= -1)*f(y=0) = .4817*.5272 = .2539 Still pretty close.
f(0,0) = .1454
.2999*.5272 = .1581 still fairly close
f(0,1) = .1545
.2999*.4726 = .1417
f(1,0) = .1273
.2182*.4726 = .1031 This one is not so close.
Your answer will depend on how close is "close". mathematically speaking,
they have to be exactly equal. But one thing we'll talk about later
is that when you are making decisions based on real data, collected randomly,
you have to make some allowances. How close you accept is something
we talk about later.
To get credit for part (e), you need to
a) one of three conditions: (i) f(x,y) = f(x) f(y)
or (ii) f(x|y) = f(x) or (iii) f(y|x) = f(y) for all values of x and
y
b) reach a conclusion based on whether or not the equality
holds.