Linear Transformation and Statistical Estimation and the Law of Large Numbers Target Goal: I can describe the effects of transforming a random variable. I can calculate expected winnings. 6.2a h.w: pg 356: 27 – 30, 37, , 43, 45
Mean and Variance for Continuous Random Variables For continuous probability distributions, x and x can be defined and computed using methods from calculus. The mean value x locates the center of the continuous distribution. The standard deviation, x, measures the extent to which the continuous distribution spreads out around x.
A company receives concrete of a certain type from two different suppliers. Letx = compression strength of a randomly selected batch from Supplier 1 y = compression strength of a randomly selected batch from Supplier 2 Suppose that x = 4650 pounds/inch 2 x = 200 pounds/inch 2 y = 4500 pounds/inch 2 y = 275 pounds/inch 2 The first supplier is preferred to the second both in terms of mean value and variability yy xx
Suppose Wolf City Grocery had a total of 14 employees. The following are the monthly salaries of all the employees. The mean and standard deviation of the monthly salaries are x = $1700 and x = $ Suppose business is really good, so the manager gives everyone a $100 raise per month. The new mean and standard deviation would be x = $1800 and x = $ What happened to the means? What happened to the standard deviations? What would happen to the mean and standard deviation if we had to deduct $100 from everyone’s salary because of business being bad? Let’s graph boxplots of these monthly salaries to see what happens to the distributions... We see that the distribution just shifts to the right 100 units but the spread is the same.
Wolf City Grocery Continued... x = $1700 and x = $ Suppose the manager gives everyone a 20% raise - the new mean and standard deviation would be x = $2040 and x = $ Notice that both the mean and standard deviation increased by 1.2. Let’s graph boxplots of these monthly salaries to see what happens to the distributions... Notice that multiplying by a constant stretches the distribution, thus, changing the standard deviation.
Mean and Standard Deviation of Linear functions If x is a random variable with mean, x, and standard deviation, x, and a and b are numerical constants, and the random variable y is defined by and
Consider the chance experiment in which a customer of a propane gas company is randomly selected. Let x be the number of gallons required to fill a propane tank. Suppose that the mean and standard deviation is 318 gallons and 42 gallons, respectively. The company is considering the pricing model of a service charge of $50 plus $1.80 per gallon.Let y be the random variable of the amount billed. What is the equation for y? What are the mean and standard deviation for the amount billed? y = (318) = $ y = x y = 1.8(42) = $75.60
Linear Transformations Pete’s Jeep Tours offers a popular half-day trip in a tourist area. There must be at least 2 passengers for the trip to run, and the vehicle willhold up to 6 passengers. Define X as the number of passengers on a randomly selected day. Transforming and Combining Random Variables Passengers x i Probability p i The mean of X is 3.75 and the standard deviation is Pete charges $150 per passenger. The random variable C describes the amount Pete collects on a randomly selected day. Collected c i Probability p i The mean of C is $ and the standard deviation is $ Compare the shape, center, and spread of the two probability distributions.
Linear Transformations How does multiplying or dividing by a constant affect a random variable? Transforming and Combining Random Variables Multiplying (or dividing) each value of a random variable by a number b: Multiplies (divides) measures of center and location (mean, median, quartiles, percentiles) by b. Multiplies (divides) measures of spread (range, IQR, standard deviation) by |b|. Multiplying does not change the shape of the distribution. Multiplying (or dividing) each value of a random variable by a number b: Multiplies (divides) measures of center and location (mean, median, quartiles, percentiles) by b. Multiplies (divides) measures of spread (range, IQR, standard deviation) by |b|. Multiplying does not change the shape of the distribution. Effect on a Random Variable of Multiplying (Dividing) by a Constant Note: Multiplying a random variable by a constant b multiplies the variance by b 2.
Linear Transformations Consider Pete’s Jeep Tours again. We defined C as the amount of money Pete collects on a randomly selected day. Transforming and Combining Random Variables It costs Pete $100 per trip to buy permits, gas, and a ferry pass. The random variable V describes the profit Pete makes on a randomly selected day. Collected c i Probability p i The mean of C is $ and the standard deviation is $ Compare the shape, center, and spread of the two probability distributions. Profit v i Probability p i The mean of V is $ and the standard deviation is $
Linear Transformations How does adding or subtracting a constant affect a random variable? Transforming and Combining Random Variables Adding the same number a (which could be negative) to each value of a random variable: Adds a to measures of center and location (mean, median, quartiles, percentiles). Adding does not change measures of spread (range, IQR, standard deviation). Does not change the shape of the distribution. Adding the same number a (which could be negative) to each value of a random variable: Adds a to measures of center and location (mean, median, quartiles, percentiles). Adding does not change measures of spread (range, IQR, standard deviation). Does not change the shape of the distribution. Effect on a Random Variable of Adding (or Subtracting) a Constant
Summary: Linear transformations Shape: same as the probability distribution of X. Center: Spread:
Recall: Statistics obtained from probability samples are random variables because their values would vary in repeated sampling. is an estimate for μ. If we choose a different random sample, the luck of the draw will probably produce a different
Law of Large Numbers Draw independent observations at random from any population with finite mean μ. As the number of observations increases, the sample mean approaches mean μ of the population. The more variation in the outcomes, the more trials are needed to ensure that is close to μ.
The law of large numbers in action Suppose the mean is What do you notice about the distribution? As we increase the size of our sample, the sample mean always approaches the mean μ of the population!
What type of businesses use law of large numbers for pricing ect? Casinos Insurance Fast food restaurants Averaging over many individuals produces stable results.
Law of Small Numbers Most people incorrectly think that short sequences of random events show us the kind of behavior that appears only in the long run. Write down a sequence of heads and tails for 10 tosses.
What was the longest run of heads or tails? What do you think the probability of a run of 3 or more heads or tails in 10 is? The probability is > 0.80!
The probability of both a run of 3 heads and 3 tails is almost 0.2. Most sequences in the short run don’t seem random to us. In the long run, they “even” out to the expected mean.
Example: The “Hot Hand in Basketball” If a basketball player makes several consecutive shots, what do you believe? She has the hot hand and should make the next shot? or, She is “due” to miss?
Neither: Random behavior says each shot is independent of the previous shot. Over the long run the regular behavior described by probability and law of large numbers takes over. Example: casinos – the mean guarantees the house a profit.
Exercise: A Game of Chance The law of large numbers says that if we take enough outcomes, their average value is sure to approach the mean of the distribution. Would you take this wager … ?
Toss a coin 10 times If there is no run of three or more heads or tails in the 10 outcomes, I’ll pay you $2. If there is a run of 3 or more, you pay me $1.
Simulate enough plays of the game to estimate the mean outcome. The outcomes are +$2 if you win and -$1 if you lose. Is it to your advantage to play ?
To simulate: MATH:randint(1,2,10) store in L1 Tally and record L, the length of the longest run of heads or tails per trail. Do 20 trials
Calculate your mean winnings. P(W) = P(1 or 2 in a row, not 3 in a row) P(L) = 1 – P(W) Expected outcome: $2P(W) + -$1P(L) Fill in table and report back.
What is your expected outcome? The actual expected outcome is: μ = ($2)((0.1738) + (-$1)(0.8262) = -$ On the average you would lose about 48 cents each time you play. How close we come to this depends on how many trails. Let’s pool the class results and recheck.