[ Pobierz całość w formacie PDF ]
be computed as follows:
> alpha
> qbinom(alpha,size=3,prob=.5)
[1] 1 1 2
Notice that X is a symmetric random variable with center of symmetry
¸ = 1.5, butpbinomcomputes q2(X) = 1. This reveals that S-Plus
may produce unexpected results when it computes the quantiles of
discrete random variables. By experimenting with various choices of
n and p, try to discover a rule according to whichpbinomcomputes
quartiles of the binomial distribution.
Chapter 6
Sums and Averages of
Random Variables
In this chapter we will describe one important way in which the theory
of probability provides a foundation for statistical inference. Imagine an
experiment that can be performed, independently and identically, as many
times as we please. We describe this situation by supposing the existence
of a sequence of independent and identically distributed random variables,
X1, X2, . . ., and we assume that these random variables have a finite mean
µ = EXi and a finite variance Ã2 = Var Xi.
This chapter is concerned with the behavior of certain random variables
that can be constructed from X1, X2, . . .. Specifically, let
n
1
¯
Xn = Xi.
n
i=1
¯
The random variable Xn is the average, or sample mean, of the random
¯
variables X1, . . . , Xn. We are interested in what the behavior of Xn, the
sample mean, tells us about µ, the population mean.
By definition, EXi = µ. Thus, the population mean is the average value
assumed by the random variable Xi. This statement is also true of the
sample mean:
n n
1 1
¯
EXn = EXi = µ = µ;
n n
i=1 i=1
¯
however, there is a crucial distinction between Xi and Xn.
117
118 CHAPTER 6. SUMS AND AVERAGES OF RANDOM VARIABLES
The tendency of a random variable to assumee a value that is close to
its expected value is quantified by computing its variance. By definition,
Var Xi = Ã2, but
n n n
1 1 1 Ã2
¯
Var Xn = Var Xi = Var Xi = Ã2 = .
n n2 i=1 n2 i=1 n
i=1
Thus, the sample mean has less variability than any of the individual random
variables that are being averaged. Averaging decreases variation. Further-
¯
more, as n ’! ", Var Xn ’! 0. Thus, by repeating our experiment enough
times, we can make the variation in the sample mean as small as we please.
The preceding remarks suggest that, if the population mean is unknown,
then we can draw inferences about it by observing the behavior of the sample
mean. This fundamental insight is the basis for a considerable portion of
this book. The remainder of this chapter refines the relation between the
population mean and the behavior of the sample mean.
6.1 The Weak Law of Large Numbers
Recall Definition 1.12 from Section 1.4: a sequence of real numbers {yn}
converges to a limit c " if, for every > 0, there exits a natural number
N such that yn " (c - , c + ) for each n e" N. Our first task is to generalize
from convergence of a sequence of real numbers to convergence of a sequence
of random variables.
If we replace {yn}, a sequence of real numbers, with {Yn}, a sequence of
random variables, then the event that Yn " (c - , c + ) is uncertain. Rather
than demand that this event must occur for n sufficiently large, we ask only
that the probability of this event tend to unity as n tends to infinity. This
results in
Definition 6.1 A sequence of random variables {Yn} converges in probabil-
P
ity to a constant c, written Yn ’! c, if, for every > 0,
lim P (Yn " (c - , c + )) = 1.
n’!"
Convergence in probability is depicted in Figure 6.1 using the pdfs of con-
tinuous random variables. (One could also use the pmfs of discrete random
variables.) We see that
c+
pn = P (Yn " (c - , c + )) = fn(x) dx
c-
6.1. THE WEAK LAW OF LARGE NUMBERS 119
Figure 6.1: Convergence in Probability
is tending to unity as n increases. Notice, however, that each pn
The concept of convergence in probability allows us to state an important
result.
Theorem 6.1 (Weak Law of Large Numbers) Let X1, X2, . . . be any se-
quence of independent and identically distributed random variables having
finite mean µ and finite variance Ã2. Then
P
¯
Xn ’! µ.
This result is of considerable consequence. It states that, as we average more
[ Pobierz całość w formacie PDF ]