Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Birthday problem wikipedia , lookup
Information theory wikipedia , lookup
Regression analysis wikipedia , lookup
Least squares wikipedia , lookup
Simplex algorithm wikipedia , lookup
Generalized linear model wikipedia , lookup
Probability box wikipedia , lookup
Chapter 7: Random Variables 7.1 Discrete and Continuous Random Variables 7.2 Means and Variances of Random Variables 1 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 2 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. 3 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. 4 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. 5 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 ≤ p( xi ) ≤ 1 2. ∑ p( x ) = 1 i 6 Practice • Problem 7.3, p. 396 7 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. 8 Types of Continuous Random Variable Probability Distributions (Density Functions) • Uniform Distribution (Example 7.3, p. 398) • Normal Distribution (Example 7.4, p. 400) 9 Figure 7.5, p. 398: Uniform Distribution 10 Figure 7.7, p. 400: Normal Distribution 11 Practice • Problem 7.6, p. 401 12 Homework • 7.2, p. 396 • 7.8, p. 402 • 7.10 and 7.11, p. 403 • Read through p. 403 13 7.10, p. 403 Household Family 14 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. 15 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 µ: µ X = ∑ xi pi • Problem 7.22, p. 411 16 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. σ x2 = ( x1 − µ x ) 2 p1 + ( x2 − µ x ) 2 p2 + ... + ( xk − µ x ) 2 pk = ∑ (xi − µ x ) 2 pi 17 Mean and Variance for a Continuous Random 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. 18 Problems • Look over Example 7.7, p. 411. • Now try Problems 7.25 and 7.26, p. 412. 19 HW • Additional Problems from 7.1 – 7.16, 7.17, 7.20, 7.21, pp. 405-407 • Reading: – pp. 407-417 20 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 21 Figure 7.10, p. 414 22 Another one, from Chapter 6 23 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). 24 Practice Problems • Problems: – 7.24, 7.29, p. 412 25 HW • Read through end of chapter. – pp. 418-427 – Rules for Means and Variances • Problems: – 7.31, p. 417 – 7.42, p. 427 26 Random Variables: Rules for Means and Variances 27 Rules for Means (1) µa +bX = a + bµ X (2) µ X +Y = µ X + µY • 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. 28 Rules for Variances (1) σ (2) σ 2 a + bX 2 X ±Y =b σ 2 2 X = σ +σ 2 X 2 Y Note: Rule 2 holds for independent random variables (see p. 421) 29 Example 7.11, p. 421 30 Practice Problems, pp. 425-426 • 7.36 • 7.37 and 7.38 31 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 32 Practice Problem 7.45, p. 428 33 Practice Problems • 7.55, 7.57, 7.63 34