1 chapter 7: random variables 7.1discrete and continuous random variables 7.2means and variances of...

34
1 Chapter 7: Random Variables 7.1 Discrete and Continuous Random Variables 7.2 Means and Variances of Random Variables

Upload: janel-cook

Post on 26-Dec-2015

237 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

1

Chapter 7: Random Variables

7.1 Discrete and Continuous Random Variables

7.2 Means and Variances of Random Variables

Page 2: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

2

Introduction

• A random variable is a function that associates a unique numerical value with every outcome of an experiment. The value of the random variable will vary from trial to trial as the experiment is repeated.

• There are two types of random variables:– Discrete

– Continuous

Page 3: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

3

Discrete Random Variables

• A discrete random variable is one which may take on only a countable number of distinct values such as 0, 1, 2, 3, 4, ...

• If a random variable can take only a finite number of distinct values, then it must be discrete.

• Examples of discrete random variables:– the number of children in a family,– the Friday night attendance at a cinema,– the number of patients in a doctor's surgery, and– the number of defective light bulbs in a box of ten.

Page 4: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

4

Continuous Random Variables

• A continuous random variable is one which takes an infinite number of possible values. Continuous random variables are usually measurements.

• Examples of continuous random variables:

– height, weight, the amount of sugar in an orange, the time required to run a mile.

Page 5: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

5

Examples

• A coin is tossed ten times. The random variable X is the number of tails that are noted. X can only take the values 0, 1, ..., 10, so X is a discrete random variable.

• A light bulb is burned until it burns out. The random variable Y is its lifetime in hours. Y can take any positive real value, so Y is a continuous random variable.

Page 6: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

6

Probability Distribution—Discrete Random Variable

• The probability distribution of a discrete random variable is a list of probabilities associated with each of its possible values.– More formally, the probability distribution of a discrete

random variable X is a function which gives the probability p(xi) that the random variable equals xi, for each value xi.

– See Example 7.1, p. 392

• The probability distribution satisfies the following conditions: 1)(0 ixp

1)( ixp

1.

2.

Page 7: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

7

Examples

• Look at example 7.2, p. 394

• Problem 7.3, p. 396

Page 8: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

8

Probability Distribution—Continuous Random Variable

• A density curve describes the probability distribution of a continuous random variable.

– Recall density curves from Ch. 2 (especially pp. 78-83).

• The probability density function of a continuous random variable is a function which can be integrated (find area under a curve, as we have done using z-tables) to obtain the probability that the random variable takes a value in a given interval.

• The probability distribution satisfies the following conditions:

– That the area under the curve must equal one.

– That the probability density function can never be negative: f(x) > 0 for all x.

Page 9: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

9

Types of Continuous Random Variable Probability Distributions (Density Functions)

• Uniform Distribution (Example 7.3, p. 398)

• Normal Distribution (Example 7.4, p. 400)

Page 10: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

10

Figure 7.5, p. 398: Uniform Distribution

Page 11: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

11

Figure 7.7, p. 400: Normal Distribution

Page 12: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

12

Practice

• Problem 7.6, p. 401

Page 13: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

13

Homework

• 7.2, p. 396

• 7.8, p. 402

• 7.10 and 7.11, p. 403

• Read through p. 403

Page 14: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

14

7.10, p. 403

Household

Family

Page 15: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

15

Mean of a Random Variable

• The mean of a random variable, also known as its expected value, is the weighted average of all the values that a random variable would assume in the long run.

Page 16: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

16

Calculation of the Mean of a Discrete Random Variable

• To find the mean of a discrete random variable X, multiply each possible value by its probability, then add all the products. Just as probabilities are an idealized description of long-run proportions, the mean of a probability distribution describes the long-run average outcome. For this statistic we use the Greek letter µ:

iiX px

• Problem 7.22, p. 411

Page 17: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

17

Variance of a Discrete Random Variable

• As we learned in earlier chapters, the mean of a distribution tells us only part of the story—we also need a measure of spread.

• The variance of a discrete random variable is an average of the squared deviation (X-µx)2 of the variable X from its mean µx.. As with the mean, we use the weighted average in which each outcome is weighted by its probability in order to take into account the outcomes that are not equally likely. Recall that standard deviation is simply the square root of variance.

ixi

kxkxxx

px

pxpxpx2

22

221

21

2

)(

)(...)()(

Page 18: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

18

Mean and Variance for a ContinuousRandom Variable

• Both of these require calculus, and are not part of the AP Stats curriculum.

– See notes at end of chapter if you are interested.

• We will focus on the mean and standard deviations for discrete random variables.

Page 19: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

19

Problems

• Look over Example 7.7, p. 411.

• Now try Problems 7.25 and 7.26, p. 412.

Page 20: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

20

HW

• Additional Problems from 7.1

– 7.16, 7.17, 7.20, 7.21, pp. 405-407

• Reading:

– pp. 407-417

Page 21: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

21

Law of Large Numbers

• Would you expect a telephone survey to provide a sample mean that is exactly the same as the population mean?

• The law of large numbers tells us that if we take a sample that is large enough, the mean (x-bar) of the observed values will eventually approach the mean (µ) of the population.

– See Example 7.8 and Figure 7.10, p. 414

Page 22: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

22

Figure 7.10, p. 414

Page 23: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

23

Another one, from Chapter 6

Page 24: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

24

Law of Large Numbers, Cont.

• The Law of Large Numbers says broadly that the average results of many independent observations are stable and predictable (p. 415).

Page 25: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

25

Practice Problems

• Problems:

– 7.24, 7.29, p. 412

Page 26: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

26

HW

• Read through end of chapter.

– pp. 418-427

– Rules for Means and Variances

• Problems:

– 7.31, p. 417

– 7.42, p. 427

Page 27: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

27

Random Variables:Rules for Means and Variances

Page 28: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

28

Rules for Means

• For Rule (1), if you add a fixed value to each number in a distribution, add this fixed value to the original mean to get the new mean. If you multiply by a constant, multiply the mean by the same constant.

• For Rule (2), simply add the means of two random variables to get the mean of the new distribution.

XbXa ba )1(

YXYX )2(

Page 29: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

29

Rules for Variances

222 )1( XbXa b

222 )2( YXYX

Note: Rule 2 holds for independent random variables (see p. 421)

Page 30: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

30

Example 7.11, p. 421

Page 31: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

31

Practice Problems, pp. 425-426

• 7.36

• 7.37 and 7.38

Page 32: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

32

Combining Normal Random Variables

• Any linear combination of independent normal random variables is also normally distributed.

– p. 424

• Find the mean and variance of the combined random variables as above.

• See Example 7.14, p. 424

Page 33: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

33

Practice

Problem 7.45, p. 428

Page 34: 1 Chapter 7: Random Variables 7.1Discrete and Continuous Random Variables 7.2Means and Variances of Random Variables

34

Practice Problems

• 7.55, 7.57, 7.63