8 Annotated Ch5.2 Continuous RV Fall 2014

7
Stat 305, Spring 2014 Name Chapter 5.2: Continuous Random Variables General Continuous Distributions Continuous RV: A RV having an entire (continuous) interval of numbers as its set of possible values. Anything whose set of values can NOT be enumerated. Usually thought of as measurements. Examples: lifetime of a battery, weight of a piston Battery Lifetime RV: W = lifetime of battery in hours. Possible values: (0, ) Weight: Z = weight of babies born at a given hospital. Possible values: (0, ) Density Probability Density Function (pdf), f(x) Can no longer say f(x) = P[X=x] as with a pmf On a continuous line, the probability of a single observation is 0; P [X = x]= P [x X x]= R x x f (x)dx = 0 for every x. For continuous RVs we will find probabilities in terms of intervals rather than single obser- vations. Also, use integrals rather than summations. Recall from Calculus that R b a f (x)dx is the area under the curve f(x) between a and b. Definition: A PDF is a nonnegative function, f(x) with Z -∞ f (x)dx =1 and for all a b, P [a X b]= Z b a f (x)dx Since the probability of observing a single value is 0, consider the following consequences: P [a X b]= P [a<X b] = P [a X<b] = P [a<X<b] Definition: the cumulative density function (cdf) for a continuous random variable is given by F (x)= P [X x]= Z x -∞ f (t)dt To obtain f(x) from F(x), we have the equality d dx F (x)= f (x) Definition: the mean of a continuous RV is given by E(X )= R -∞ xf (x)dx Definition: the variance of a continuous RV is given by Var(X )= R -∞ (x - E(X )) 2 f (x)dx = R -∞ x 2 f (x)dx - (E[X ]) 2 = E[X 2 ] - [E(X )] 2 1

description

Continuous RV statistics

Transcript of 8 Annotated Ch5.2 Continuous RV Fall 2014

Page 1: 8 Annotated Ch5.2 Continuous RV Fall 2014

Stat 305, Spring 2014 Name

Chapter 5.2: Continuous Random Variables

General Continuous Distributions

Continuous RV: A RV having an entire (continuous) interval of numbers as its set of possible values.

• Anything whose set of values can NOT be enumerated.

• Usually thought of as measurements.

• Examples: lifetime of a battery, weight of a piston

– Battery Lifetime RV: W = lifetime of battery in hours. Possible values: (0,∞)

– Weight: Z = weight of babies born at a given hospital. Possible values: (0,∞)

Density

Probability Density Function (pdf), f(x)

• Can no longer say f(x) = P[X=x] as with a pmf

• On a continuous line, the probability of a single observation is 0;P [X = x] = P [x ≤ X ≤ x] =

∫ xx f(x)dx = 0 for every x.

• For continuous RVs we will find probabilities in terms of intervals rather than single obser-vations.

• Also, use integrals rather than summations.

• Recall from Calculus that∫ ba f(x)dx is the area under the curve f(x) between a and b.

Definition: A PDF is a nonnegative function, f(x) with∫ ∞−∞

f(x)dx = 1

and for all a ≤ b,

P [a ≤ X ≤ b] =

∫ b

af(x)dx

• Since the probability of observing a single value is 0, consider the following consequences:

P [a ≤ X ≤ b] = P [a < X ≤ b]= P [a ≤ X < b]

= P [a < X < b]

Definition: the cumulative density function (cdf) for a continuous random variable is given by

F (x) = P [X ≤ x] =

∫ x

−∞f(t)dt

• To obtain f(x) from F(x), we have the equalityd

dxF (x) = f(x)

• Definition: the mean of a continuous RV is given by E(X) =∫∞−∞ xf(x)dx

• Definition: the variance of a continuous RV is given by Var(X) =∫∞−∞(x−E(X))2f(x)dx =∫∞

−∞ x2f(x)dx− (E[X])2 = E[X2]− [E(X)]2

1

Page 2: 8 Annotated Ch5.2 Continuous RV Fall 2014

Example

Consider the function:f(x) = k(x2 − x), 1 ≤ x ≤ 2

1. What value of k makes this a valid pdf? For the remaining problems, use the value of kcalculated here.

2. Calculate P [X ≤ 1.5].

3. Calculate E[X].

4. Calculate Var[X].

Normal Distribution

Definition: The Normal (or Gaussian) distribution with parameters −∞ < µ <∞ and σ > 0is a continuous distribution with pdf:

f(x) =1√

2πσ2exp

[−(x− µ)2

2σ2

]−∞ ≤ x ≤ ∞

• Don’t ever use this formula, we will use tables (or computers) to find normal probabilities.

• For X ∼ N(µ, σ2), E(X) = µ, and Var(X) = σ2.

2

Page 3: 8 Annotated Ch5.2 Continuous RV Fall 2014

• The graph of a normal pdf is bell-shaped and symmetric about µ.

Standard Normal Distribution Z ∼ N(0, 1)

Standard Normal is a special case of the normal distribution where µ = 0 and σ2 = 1; generallylabeled Z ∼ N(0, 1)

• Calculating P (a < X < b) for any Normal(µ, σ2) is difficult (beyond introductory calculus)

• We’ll use probability tables based on a Z ∼ N(0, 1).

• We can use these tables, along with some algebra, to compute probabilities for any normaldistribution.

• The table gives values for the CDF of the N(0,1) distribution.

• Vertical numbers (1st column) are the 1’s and tenths digit of z.

• Horizontal numbers (1st row) are the hundredths digit of z.

• Example: P [Z < −1.32] = 0.0934

• When values are off the table, they have probabilities of approximately 0 or 1.

Standard Normal Examples

1. P [0.57 < Z < 1.32]

2. P [Z > −0.89]

3. P [|Z| < 0.93]

3

Page 4: 8 Annotated Ch5.2 Continuous RV Fall 2014

4. Find the value of c that satisfies P [Z < c] = 0.9

5. Find the value of c that satisfies P [|Z| < c] = 0.9

6. Find the value of c that satisfies P [|Z| > c] = 0.9

Other Normal Distribution X ∼ N(µ, σ2)

What about other normal distributions?

• If X ∼ N(µ, σ2) then the transformation Z = (X−µ)σ2 creates a standard normal distribution.

• Note the following relationship:

P (a ≤ X ≤ b) = P

[a− µσ≤ X − µ

σ≤ b− µ

σ

]= P

[a− µσ≤ Z ≤ b− µ

σ

]Other Normal Examples

Let X ∼ N(43, 12.96)

1. Find P [X < 45.2]

2. Find P [|X − 43| < 2]

4

Page 5: 8 Annotated Ch5.2 Continuous RV Fall 2014

3. Find c such that P [X > c] = 0.3

Example

The process of grinding piston rings is such that the empirical distribution, consisting of 100 datapoints collected over years of manufacturing, of edge-widths after 1 grind is as seen bellow. Theempirical distribution has a mean of 0.1387in and a standard deviation of 0.0004in.

Suppose we select one piston ring at random, and let the random variable X represent the edgewidth of that piston ring.

1. What distribution should we use?

2. Using this distribution, what fraction of the rings have edge-widths above 0.1380”?

5

Page 6: 8 Annotated Ch5.2 Continuous RV Fall 2014

3. What two edge-widths do 80% of the piston rings fall between?

Chapter 5.3: Probability Plotting

Recall Q-Q plots from Ch3

If two data sets are generated from distributions of the same shape, then the quantiles of one dataset should be linearly related to the quantiles of the second data set.To create a Q-Q plot we plot the ordered pairs:(

Q1

(i− 0.5

n

), Q2

(i− 0.5

n

))Normal Quantile Plot

Just as we used Q-Q plots to check if two data sets come from the same distribution, we can use anormal quantile plot to check if one data set matches the normal distribution.

• Plot quantiles from the data set against known quantiles from the normal distribution.

• Use table 3.10 (pg 89) to get the Normal quantiles.

• In table 3.10, Surrounding the table is p, and inside the table is Q(p).

Example 1

Consider the data set

0.37 2.48 5.46 5.56 5.83 6.31 7.27 7.89 8.13 8.318.56 9.55 10.01 11.45 14.07 14.36 14.75 14.97 15.12 15.32

Is this data normally distributed?

i 1 2 3 4 5 6 7 8 9 10

p .025 .075 .125 .175 .225 .275 .325 .375 .425 .475

Q(p) 0.37 2.48 5.46 5.56 5.83 6.31 7.27 7.89 8.13 8.31

SNQ(p) -1.88 -1.41 -1.13 -.92 -.74 -.58 -.44 -.31 -.18 -.05

i 11 12 13 14 15 16 17 18 19 20

p .525 .575 .625 .675 .725 .775 .825 .875 .925 .975

Q(p) 8.56 9.55 10.01 11.45 14.07 14.36 14.75 14.97 15.12 15.32

SNQ(p) .08 .20 .33 .47 .61 .77 .95 1.18 1.48 2.05

6

Page 7: 8 Annotated Ch5.2 Continuous RV Fall 2014

Example 2

What about this plot? Do these data appear normal?

Example 3

Now you try: Create a normal probability plot for the sample.4.7, 6.0, 6.8, 8.9, 10.7

7