Professional Documents
Culture Documents
Carol Ash-The Probability Tutoring Book - An Intuitive Course For Engineers and Scientists (And Everyone Else!) - Wiley-IEEE Press (1996) PDF
Carol Ash-The Probability Tutoring Book - An Intuitive Course For Engineers and Scientists (And Everyone Else!) - Wiley-IEEE Press (1996) PDF
95
In other words, you want to find n so that you can be at least 95% sure that
the actual percentage of A voters is within 3% of the sample percentage.
The interval
[= — .03, x, 203]
n n
is called the confidence interval. And the .95 is called the confidence level. The
smaller the confidence interval and the higher the confidence level desired,
the larger you'll have to make n.
T'll show you how to find n for the interval and level in (1). Similar cal-
culations can be done for any interval and level you like.
Rewrite (1) as the inequality
Q) P(np — .03n < X < np+.03n) > .95
Pil actually solve the equation
@) P(np—.03n < X < np +.03n) =
for n. Then any larger n will satisfy (2). (If a sample of size n makes you 95%
sure, then a larger sample can only serve to increase your sureness.)
Remember that X is the number of A voters in a sample of size n where
the probability of an A voter is p. Drawings without replacement from a large
population can be considered to be independent trials, so X has a binomial
distribution with parameters n and p. The key idea is that if n is large, the bi-
nomial can be approximated by the normal so that X is approximately normal
with
b=np, o? =npq
Subtract ys and divide by o throughout the parenthesized inequality in (3) to
get
an
= 95
am)
03Vn
SP oxt< = 95
“m)140 Sec. 4-5 _The Election Problem
total area.975
3
Figure 1
If 95% of the area under the unit normal is to lie between —.03y/n/ pq and
.03/n/ Pq (Fig. 1), then 97.5% of the area lies to the left of .03/n/ pd.
The normal tables list
F*(1.96) = 975
so
03/0 = 1.96
Pq
1.96 Pq
03
and the solution to (3) is
n= 4268pq
The solution to the original inequality in (2) is
n> 4268pq
The catch is that we don’t know p or q. The whole point of taking the sample
of size n in the first place is to be able to predict p.
But the worst (biggest) that pq can be is 1/4 (when p = 1/2. and q = 1/2),
s0 it’s always safe to choose
n> 4268 x 5 = 1067
With this n you can be 95% sure that the p you're looking for is within
3% of the sample percentage X/n (give or take the error introduced, because
we approximated the binomial with the normal).
‘The TV anchors faithfully report the error margin, that is, the confidence
interval, say, from 49% to 55%, But they make it sound like a sure thing that
the number of A voters lies in this interval. They never mention the confidence
level which warns that this is, say, only 95% likely.Chap.4 Continuous Random Variables 141
SECTION 4-6 FUNCTIONS OF A RANDOM VARIABLE
Suppose you know the distribution of the radius R of a circle and want the dis-
tribution of its area 7 R®. (For example, if R is picked at random between 0 and
5, then the area must be between 0 and 25z, but is it uniformly distributed?)
Or suppose you know the distribution of a signal X. Before the signal
reaches you, it’s squared and shifted so that what you actually receive is X?+7.
We want the distribution of the received signal.
In general, given the distribution of X, we'll find the distribution of some
function Y of X. There are two methods.
1, Find the distribution function F(y) first and then find the density f(y).
2. Find the density f(y) directly.
Throughout, X and Y are random variables, while x and y are values of the
random variables.
The Distribution Function Method
Let X have an exponential distribution with A = 1 so that
fx(z) =
forz>0
Let
2
We'll find the density of ¥’ by first finding the distribution function of Y. We
know that X is always > 0. By inspection, this makes Y always < 2 and so
Fy(y)=1ify>2 (all the probability has accumulated by y = 2)
Consider y < 2. We have
Fy(y) = PW 0,0 ¥ increases
with X; if p= —1, then Y = aX +6, where a < 0, so Y decreases
as X increases.
If p is near +1, then Y is very likely to be close to its linear least
squares estimate.
Independent Random Variables versus
Uncorrelated Random Variables
If p =, then the best mean square error in (3) is at its worst. In this case X
and Y are said to be uncorrelated.
If X and ¥ are independent, then E(XY) = (EX)(EY), Cow(X,¥) =
0, and p(X, ¥) = 0.
So independent pairs are uncorrelated.
But X and ¥ can be uncorrelated even if X and ¥ are not independent
(this goes back to the fact that E(XY) can equal (EX)(EY) even if X and Y
are not independent) (Fig, 1).Chap.7 Expectation Again 237
all pairs of random variables
uncorrelated pairs
Figure 1
Proof of (2) and (3)
Part. First we'll consider the special case where
ux=0 and = py=0
EIY — (aX +6)? = B[Y? — 2¥ (aX +8) + (aX +5)"]
= EY? — 20 EXY + 0? BX? +8?
(drop all terms involving BX and EY since they are 0)
In this special case where EX = 0, EY = 0, we have
IX? = Var X = 0%, EY? = Var¥ = 02,
EXY = Cov (X,Y) = poxoy
so
6) E\Y — (aX +6)]? = of — 2apoxoy +0?o% +P
Now let’s find the a and b that make the expectation in (5) minimum. By
inspection, we need
© b=0
That leaves
oy — 2apoxoy +.a°’o%
which you can think of as a quadratic in the variable a, namely,
Ad? + Ba+C
where238 Sec. 7-3 Correlation
Az=ok
B=-2poxoy
C=0
‘To find the min, take the derivative with respect to a and set it equal to 0. The
min occurs when
2Aa+B=0
_B _ %»oxoy _ oy
2A 2% ox
(7) a=
The value of a in (7) matches the value claimed in (2), and the value 6 = 0 in
(6) matches the value 6 = zy — aj1x claimed in (2) (remember that this part
of the proof assumes yx = 0 and py = 0). This proves (2) in the special case.
With the a and 6 in (6) and (7), the mean square error itself, from (5), is
. 2
2 2 OY 92
oy — 2, 0. = o
¥ 2p T poxoy +o ok
5 =0} - 2p o} + Po}
=o} poh
= oF (1-64)
This proves (3) in the special case.
Part I. Now consider the general case where X and Y have respec-
tive means x and py.
First, we'll define some new random variables and find their means, vari-
ances, and correlation.
Let
Xnew = X - wx
Ynew = ¥ - uy
The new random variables have zero means but the same variances and cor-
relation as the original X and Y; in other words,
(9) exnew =0, vynew =0
2 a4 2 ae.
(10) oxnew = %X> Tynew = Fy
oxnew = 0x, Oynew = oy
qu) p(Xnew, Ynew) = (X,Y)Chap.7 Expectation Again 239
Here’s why. We have
Ecxnewy = E(X - x) = EX - px = px — ux
and similarly for Y, so (9) holds.
Also
o%new = Var (Xnew) = Var(X — px) = Var X
[remember the rule Var (aX + b) = a? Var X]
and similarly for Y, so (10) holds.
‘And
Cov (Xnew, Ynew) = E(Xnew Ynew) — E(Xnew)£(Ynew)
= El(X - ux)(¥ —py)]-0-0 (by (9)
= Cov(X,Y)
This result together with (10) shows that (11) holds.
Now we're ready to minimize
(12) E|Y - (aX +0)?
Use algebra to rewrite (12) like this:
BUY - (aX +5)?
(13) = E{Y — py — [a(X — ux) +b- py + apx]}?
= ElYnew — (aXnew +)]?_ where c= b— py + aux.
The key is that uxnew = 0.and py new = 050 you can apply Part I of the proof
with Xnew playing the role of X, Ynew playing the role of Y and c playing the
role of b.
The minimum value in (13) is achieved with
a= pnew 22 (by (7) in Part I)
oxnew
(14) =e (by (10) and (11))
and
c=0 — (by(6)in Part I)
b—py t+apx =0
(15) b= py —apx
The values of a and b in (14) and (15) prove (2) in the general case.240 Sec. 7-3 Correlation
And
min value of (12) = min value of (13)
= o}new(1— Phew) (from (8))
= oF (1—p2) (by (10) and (11))
This proves (3) in the general case.
Proof of (4)
If p = +1, then the mean square error in (3) is 0, so Y equals its estimate.
Proof of (1)
The mean square error in (3) can’t be negative, so 1 — p* can’t be negative, so
-1 +o) = P(X* > 1) =1- F*(1) =.159
Pus X Spto)=PO< X* <1) =F*(1) - F*(0) = .341Solutions 347
P(u—o for0< p< 10,pa =) = f ind Ini ay* =?
If8You might also like