Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

An Introduction To Statistical Inference And Data Analysis

.pdf
Скачиваний:
2
Добавлен:
10.07.2022
Размер:
943.46 Кб
Скачать

90

CHAPTER 4. CONTINUOUS RANDOM VARIABLES

0.05

 

 

 

 

 

 

 

 

0.04

 

 

 

 

 

 

 

 

0.03

 

 

 

 

 

 

 

 

f(x)

 

 

 

 

 

 

 

 

0.02

 

 

 

 

 

 

 

 

0.01

 

 

 

 

 

 

 

 

0.0

 

 

 

 

 

 

 

 

-10

0

10

20

30

40

50

60

70

 

 

 

 

x

 

 

 

 

Figure 4.4: Probability Density Function of X » Uniform[0; 60)

Let F denote the cdf of Y . We want to calculate

P (30 < Y < 50) = F (50) ¡ F (30):

We proceed to derive the cdf of Y . It is evident that Y (S) = [0; 60), so F (y) = 0 if y < 0 and F (y) = 1 if y ¸ 1. If y 2 [0; 60), then (by the independence of X1 and X2)

F (y) = P (Y · y) =

P (max(X1; X2) · y) = P (X1 · y; X2 · y)

=

P (X

 

y)

 

P (X

 

 

y) =

y ¡ 0

y ¡ 0

 

1 ·

¢

2

·

60 ¡ 0 ¢ 60 ¡ 0

 

 

 

 

 

 

= y2 :

3600

Thus, the desired probability is

P (30 < Y < 50) = F (50) ¡ F (30) =

502

¡

302

=

4

:

 

 

 

 

3600

3600

9

4.3. ELEMENTARY EXAMPLES

91

0.05

 

 

 

 

 

 

 

 

0.04

 

 

 

 

 

 

 

 

0.03

 

 

 

 

 

 

 

 

f(y)

 

 

 

 

 

 

 

 

0.02

 

 

 

 

 

 

 

 

0.01

 

 

 

 

 

 

 

 

0.0

 

 

 

 

 

 

 

 

-10

0

10

20

30

40

50

60

70

 

 

 

 

y

 

 

 

 

Figure 4.5: Probability Density Function for Example 2

In preparation for Example 3, we claim that the pdf of Y is

f(y) =

8 y=1800

y

2

[0; 60)

 

9

;

 

>

0

y

2

(¡1; 0)

>

 

 

<

0

y

2

[60;

1

)

=

 

 

>

 

 

 

 

>

 

 

:

 

 

 

 

 

 

;

 

which is graphed in Figure 4.5. To check that f is really a pdf, observe that f(y) ¸ 0 for every y 2 < and that

1 60 Area[0;60)(f) = 2(60 ¡ 0)1800 = 1:

To check that f is really the pdf of Y , observe that f(y) = 0 if y 62[0; 60) and that, if y 2 [0; 60), then

P (Y 2 [0; y)) = P (Y · y) = F (y) =

y2

1

(y ¡ 0)

y

 

 

=

 

 

= Area[0;y)(f):

3600

2

1800

If the pdf had been speci¯ed, then instead of deriving the cdf we would have simply calculated

P (30 < Y < 50) = Area(30;50)(f)

by any of several convenient geometric arguments.

92

CHAPTER 4. CONTINUOUS RANDOM VARIABLES

Example 3 Consider two battery-powered watches. Let X1 denote the number of minutes past the hour at which the ¯rst watch stops and let X2 denote the number of minutes past the hour at which the second watch stops. What is the probability that the sum of X1 and X2 will be between 45 and

75?

Again we have two independent random variables, each distributed as Uniform[0; 60), and a third random variable,

Z = X1 + X2:

We want to calculate

P (45 < Z < 75) = P (Z 2 (45; 75)) :

0.05

 

 

 

 

 

 

0.04

 

 

 

 

 

 

0.03

 

 

 

 

 

 

f(z)

 

 

 

 

 

 

0.02

 

 

 

 

 

 

0.01

 

 

 

 

 

 

0.0

 

 

 

 

 

 

0

20

40

60

80

100

120

 

 

 

z

 

 

 

Figure 4.6: Probability Density Function for Example 3

It is apparent that Z(S) = [0; 120). Although we omit the derivation, it can be determined mathematically that the pdf of Z is

f(z) =

>

 

 

0

z

2

(¡1; 0)

>

:

 

>

 

¡

 

 

2

 

>

 

 

<

 

z=3600

z

[0; 60)

=

 

 

8

 

 

2

9

 

 

>

(120

 

0

z 2

[120; 1)

>

 

 

>

 

z)=3600

z

 

[60; 120)

>

 

 

>

 

 

 

 

 

 

>

 

 

>

 

 

 

 

 

 

>

 

 

:

 

 

 

 

 

 

;

 

4.4. NORMAL DISTRIBUTIONS

93

This pdf is graphed in Figure 4.6, in which it is apparent that the area of the shaded region is

P (45 < Z < 75) =

P (Z 2 (45; 75)) = Area(45;75)(f)

120 ¡ 75

=

1

¡

1

(45

¡

0)

 

45

¡

1

(120

¡

75)

 

 

 

 

 

2

 

3600

2

3600

 

 

 

 

 

 

 

 

=

1 ¡

452

=

7

 

:

 

 

 

 

 

 

 

602

16

 

 

 

 

 

 

 

 

4.4Normal Distributions

We now introduce the most important family of distributions in probability or statistics, the familiar bell-shaped curve.

De¯nition 4.5 A continuous random variable X is normally distributed with mean ¹ and variance ¾2 > 0, denoted X » Normal(¹; ¾2), if the pdf of

X is

 

 

 

 

"¡

 

 

 

 

 

 

f(x) =

1

 

exp

1

 

x ¡ ¹

2

:

(4.7)

 

 

 

 

µ

 

 

p2¼¾

 

2

¾

#

 

Although we will not make extensive use of (4.7), a great many useful properties of normal distributions can be deduced directly from it. Most of the following properties can be discerned in Figure 4.7.

1. f(x) > 0. It follows that, for any nonempty interval (a; b),

P (X 2 (a; b)) = Area(a;b)(f) > 0;

and hence that X(S) = (¡1; +1).

2.f is symmetric about ¹, i.e. f(¹ + x) = f(¹ ¡ x).

3.f(x) decreases as jx ¡¹j increases. In fact, the decrease is very rapid. We express this by saying that f has very light tails.

:

4. P (¹ ¡ ¾ < X < ¹ + ¾) = :68.

:

5. P (¹ ¡ 2¾ < X < ¹ + 2¾) = :95.

:

6. P (¹ ¡ 3¾ < X < ¹ + 3¾) = :99.

94

CHAPTER 4. CONTINUOUS RANDOM VARIABLES

0.5

 

 

 

 

 

 

 

 

0.4

 

 

 

 

 

 

 

 

0.3

 

 

 

 

 

 

 

 

f(x)

 

 

 

 

 

 

 

 

0.2

 

 

 

 

 

 

 

 

0.1

 

 

 

 

 

 

 

 

0.0

 

 

 

 

 

 

 

 

-4

-3

-2

-1

0

1

2

3

4

 

 

 

 

x

 

 

 

 

Figure 4.7: Probability Density Function of X » Normal(¹; ¾2)

Notice that there is no one normal distribution, but a 2-parameter family of uncountably many normal distributions. In fact, if we plot ¹ on a horizontal axis and ¾ > 0 on a vertical axis, then there is a distinct normal distribution for each point in the upper half-plane. However, Properties 4{6 above, which hold for all choices of ¹ and ¾, suggest that there is a fundamental equivalence between di®erent normal distributions. It turns out that, if one can compute probabilities for any one normal distribution, then one can compute probabilities for any other normal distribution. In anticipation of this fact, we distinguish one normal distribution to serve as a reference distribution:

De¯nition 4.6 The standard normal distribution is Normal(0; 1).

The following result is of enormous practical value:

Theorem 4.1 If X » Normal(¹; ¾2), then

Z = X ¾¡ ¹ » Normal(0; 1):

4.4. NORMAL DISTRIBUTIONS

95

The transformation Z = (X ¡ ¹)=¾ is called conversion to standard units. Detailed tables of the standard normal cdf are widely available, as is

computer software for calculating speci¯ed values. Combined with Theorem 4.1, this availability allows us to easily compute probabilities for arbitrary normal distributions. In the following examples, we let F denote the cdf of Z » Normal(0; 1) and we make use of the S-Plus function pnorm.

Example 1 If X » Normal(1; 4), then what is the probability that X assumes a value no more than 3?

Here, ¹ = 1, ¾ = 2, and we want to calculate

P (X · 3) = P µX ¾¡ ¹ · 3 ¡¾ ¹= P µZ · 3 ¡2 1 = 1= F (1):

We do so in S-Plus as follows:

> pnorm(1) [1] 0.8413447

Remark The S-Plus function pnorm accepts optional arguments that specify a mean and standard deviation. Thus, in Example 1, we could directly evaluate P (X · 3) as follows:

> pnorm(3,mean=1,sd=2) [1] 0.8413447

This option, of course, is not available if one is using a table of the standard normal cdf. Because the transformation to standard units plays such a fundamental role in probability and statistics, we will emphasize computing normal probabilities via the standard normal distribution.

Example 2 If X » Normal(¡1; 9), then what is the probability that X

assumes a value of at least ¡7?

 

 

 

 

 

 

 

 

Here, ¹ = ¡1, ¾ = 3, and we want to calculate

 

¸ ¡

 

µ

¾

 

 

¸

¾

P (X

 

7) = P

X ¡ ¹

 

 

¡7 ¡ ¹

 

 

 

 

 

 

= ¡2

 

 

= P µZ ¸

¡7 + 1

 

 

3

 

 

= 1

¡ P (Z < ¡2)

 

 

 

= 1

¡ F (¡2):

 

 

 

 

We do so in S-Plus as follows:

 

 

 

 

 

 

 

 

96

CHAPTER 4. CONTINUOUS RANDOM VARIABLES

> 1-pnorm(-2) [1] 0.9772499

Example 3 If X » Normal(2; 16), then what is the probability that X assumes a value between 0 and 10?

Here, ¹ = 2, ¾ = 4, and we want to calculate

 

 

µ

 

¾

¾

 

 

¾

 

P (0 < X < 10) =

P

 

0

¡ ¹

<

X ¡ ¹

<

10 ¡

¹

 

 

µ¡

 

 

 

 

 

 

 

 

 

 

4

 

 

 

4

 

 

 

=

P

 

 

:5 =

0 ¡ 2

< Z <

10 ¡ 2

 

 

 

 

 

=P (Z < 2) ¡ P (Z < ¡:5)

=F (2) ¡ F (¡:5):

= 2

We do so in S-Plus as follows:

> pnorm(2)-pnorm(-.5) [1] 0.6687123

Example 4 If X » Normal(¡3; 25), then what is the probability that jXj assumes a value greater than 10?

Here, ¹ = ¡3, ¾ = 5, and we want to calculate

P (jXj > 10) =

P (X > 10 or X < ¡10)

 

 

 

 

 

 

 

 

 

 

 

=

P (X > 10) + P (X < ¡10)

µ

¾

 

 

¡

¾¡

 

 

µ

¾

 

 

¾¡

 

 

 

 

= P

X ¡ ¹

>

10

¹

+ P

 

X ¡

¹

<

 

10

 

¹

 

 

 

 

 

µZ <

 

 

 

 

 

= ¡1:2

= P µZ > 105

 

= 2:6+ P

¡ 5

 

 

 

 

+ 3

 

 

 

 

 

 

 

10 + 3

 

 

 

 

= 1 ¡ F (2:6) + F (¡1:2):

We do so in S-Plus as follows:

> 1-pnorm(2.6)+pnorm(-1.2) [1] 0.1197309

Example 5 If X » Normal(4; 16), then what is the probability that X2 assumes a value less than 36?

4.5. NORMAL SAMPLING DISTRIBUTIONS

 

 

 

 

 

97

Here, ¹ = 4, ¾ = 4, and we want to calculate

 

 

 

 

 

 

P (X2 < 36) = P (¡6 < X < 6)

¾

 

 

 

¾

 

 

µ

¡ ¾¡

 

 

 

 

 

 

 

 

 

 

= P

 

 

6

¹

<

X ¡ ¹

<

6

¡

¹

 

 

 

 

 

 

 

 

 

 

 

 

 

µ¡

 

 

¡

4¡

 

 

 

 

 

 

4

= P

 

 

2:5 =

 

 

6

4

< Z <

 

6 ¡ 4

= :5

 

 

 

 

 

 

 

 

=P (Z < :5) ¡ P (Z < ¡2:5)

=F (:5) ¡ F (¡2:5):

We do so in S-Plus as follows:

> pnorm(.5)-pnorm(-2.5) [1] 0.6852528

We defer an explanation of why the family of normal distributions is so important until Section 6.2, concluding the present section with the following useful result:

Theorem 4.2 If X1 » Normal1; ¾12) and X2 » Normal2; ¾22) are inde-

pendent, then

X1 + X2 » Normal1 + ¹2; ¾12 + ¾22):

4.5Normal Sampling Distributions

A number of important probability distributions can be derived by considering various functions of normal random variables. These distributions play important roles in statistical inference. They are rarely used to describe data; rather, they arise when analyzing data that is sampled from a normal distribution. For this reason, they are sometimes called sampling distributions.

This section collects some de¯nitions of and facts about several important sampling distributions. It is not important to read this section until you encounter these distributions in later chapters; however, it is convenient to collect this material in one easy-to-¯nd place.

Chi-Squared Distributions Suppose that Z1; : : : ; Zn » Normal(0; 1) and consider the continuous random variable

Y = Z12 + ¢¢¢ + Zn2:

98

CHAPTER 4. CONTINUOUS RANDOM VARIABLES

Because each Zi2 ¸ 0, the set of possible values of Y is Y (S) = [0; 1). We are interested in the distribution of Y .

The distribution of Y belongs to a family of probability distributions called the chi-squared family. This family is indexed by a single real-valued parameter, º 2 [1; 1), called the degrees of freedom parameter. We will denote a chi-squared distribution with º degrees of freedom by Â2(º). Figure 4.8 displays the pdfs of several chi-squared distributions.

1.5

 

 

 

 

 

1.0

 

 

 

 

 

f(y)

 

 

 

 

 

0.5

 

 

 

 

 

0.0

 

 

 

 

 

0

2

4

6

8

10

 

 

 

y

 

 

Figure 4.8: Probability Density Functions of Y » Â2(º) for º = 1; 3; 5

The following fact is quite useful:

Theorem 4.3 If Z1; : : : ; Zn » Normal(0; 1) and Y = Z12 + ¢¢¢ + Zn2, then

Y » Â2(n).

In theory, this fact allows one to compute the probabilities of events de¯ned by values of Y , e.g. P (Y > 4:5). In practice, this requires evaluating the cdf of Â2(º), a function for which there is no simple formula. Fortunately, there exist e±cient algorithms for numerically evaluating these cdfs. The S-Plus function pchisq returns values of the cdf of any speci¯ed chi-squared distribution. For example, if Y » Â2(2), then P (Y > 4:5) is

4.5. NORMAL SAMPLING DISTRIBUTIONS

99

> 1-pchisq(4.5,df=2) [1] 0.1053992

t Distributions Now let Z » Normal(0; 1) and Y » Â2(º) be independent random variables and consider the continuous random variable

T = pZ :

Y=º

The set of possible values of T is T (S) = (¡1; 1). We are interested in the distribution of T .

De¯nition 4.7 The distribution of T is called a t distribution with º degrees of freedom. We will denote this distribution by t(º).

The standard normal distribution is symmetric about the origin; i.e., if p

Z » Normal(0; 1), then ¡Z » Normal(0; 1). It follows that T = Z= Y=º p

and ¡T = ¡Z= Y=º have the same distribution. Hence, if p is the pdf of T , then it must be that p(t) = p(¡t). Thus, t pdfs are symmetric about the origin, just like the standard normal pdf.

Figure 4.9 displays the pdfs of two t distributions. They can be distinguished by virtue of the fact that the variance of t(º) decreases as º increases. It may strike you that t pdfs closely resemble normal pdfs. In fact, the standard normal pdf is a limiting case of the t pdfs:

Theorem 4.4 Let Fº denote the cdf of t(º) and let © denote the cdf of Normal(0; 1). Then

lim Fº(t) = ©(t)

º!1

for every t 2 (¡1; 1).

Thus, when º is su±ciently large (º > 40 is a reasonable rule of thumb), t(º) is approximately Normal(0; 1) and probabilities involving the former can be approximated by probabilities involving the latter.

In S-Plus, it is just as easy to calculate t(º) probabilities as it is to calculate Normal(0; 1) probabilities. The S-Plus function pt returns values of the cdf of any speci¯ed t distribution. For example, if T » t(14), then P (T · ¡1:5) is

> pt(-1.5,df=14) [1] 0.07791266

Соседние файлы в предмете Социология