Week 8 Chapter 14. Random Variables.

Slides:



Advertisements
Similar presentations
SAMPLING DISTRIBUTIONS Chapter How Likely Are the Possible Values of a Statistic? The Sampling Distribution.
Advertisements

Chapter 8: Binomial and Geometric Distributions
CHAPTER 13: Binomial Distributions
Sections 4.1 and 4.2 Overview Random Variables. PROBABILITY DISTRIBUTIONS This chapter will deal with the construction of probability distributions by.
Chapter – Binomial Distributions Geometric Distributions
Probability Distributions
The Normal Probability Distribution
Variance Fall 2003, Math 115B. Basic Idea Tables of values and graphs of the p.m.f.’s of the finite random variables, X and Y, are given in the sheet.
McGraw-Hill/IrwinCopyright © 2009 by The McGraw-Hill Companies, Inc. All Rights Reserved. Chapter 4 and 5 Probability and Discrete Random Variables.
1 Overview This chapter will deal with the construction of probability distributions by combining the methods of Chapter 2 with the those of Chapter 4.
Chapter 5 Sampling Distributions
CA200 Quantitative Analysis for Business Decisions.
Notes – Chapter 17 Binomial & Geometric Distributions.
5.5 Distributions for Counts  Binomial Distributions for Sample Counts  Finding Binomial Probabilities  Binomial Mean and Standard Deviation  Binomial.
Binomial Experiment A binomial experiment (also known as a Bernoulli trial) is a statistical experiment that has the following properties:
Chapter 17: probability models
Random Variables Presentation 6.. Random Variables A random variable assigns a number (or symbol) to each outcome of a random circumstance. A random variable.
Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved THE Normal PROBABILITY DISTRIBUTION.
Sections 5.1 and 5.2 Review and Preview and Random Variables.
Chapter 7: Sampling Distributions Section 7.1 How Likely Are the Possible Values of a Statistic? The Sampling Distribution.
Chapter 16 Week 6, Monday. Random Variables “A numeric value that is based on the outcome of a random event” Example 1: Let the random variable X be defined.
Review Know properties of Random Variables
Section 6.3 Geometric Random Variables. Binomial and Geometric Random Variables Geometric Settings In a binomial setting, the number of trials n is fixed.
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 5-1 Chapter 5 Some Important Discrete Probability Distributions Business Statistics,
1. 2 At the end of the lesson, students will be able to (c)Understand the Binomial distribution B(n,p) (d) find the mean and variance of Binomial distribution.
Slide 1 Copyright © 2004 Pearson Education, Inc. Chapter 5 Probability Distributions 5-1 Overview 5-2 Random Variables 5-3 Binomial Probability Distributions.
A federal report finds that lie detector tests given to truthful persons have probability about 0.2 of suggesting that the person is deceptive. A company.
Review session i: Probability Friday, July 22nd, 2016
Chapter Five The Binomial Probability Distribution and Related Topics
6.3 Binomial and Geometric Random Variables
CHAPTER 6 Random Variables
Introduction to Probability Distributions
Your mail-order company advertises that it ships 90% of its orders within three working days. You select an SRS of 100 of the 5000 orders received in.
Section 7.3: Probability Distributions for Continuous Random Variables
Binomial and Geometric Random Variables
CHAPTER 14: Binomial Distributions*
CHAPTER 6 Random Variables
Chapter 5 Probability 5.2 Random Variables 5.3 Binomial Distribution
Chapter 6. Continuous Random Variables
The Normal Distribution
AP Statistics Chapter 16.
Chapter 5 Sampling Distributions
Chapter 17 Probability Models Copyright © 2010 Pearson Education, Inc.
Combining Random Variables
Chapter 5 Sampling Distributions
Chapter 5 Sampling Distributions
Discrete Probability Distributions
Chapter 3 Discrete Random Variables and Probability Distributions
Sampling Distribution Models
Simple Random Sample A simple random sample (SRS) of size n consists of n elements from the population chosen in such a way that every set of n elements.
CHAPTER 6 Random Variables
Chapter 4 Discrete Random Variables and Probability Distributions
Chapter 5 Sampling Distributions
Overview probability distributions
Probability distributions
Probability Key Questions
Probability Theory and Specific Distributions (Moore Ch5 and Guan Ch6)
Chapter 6: Random Variables
Chapter 5 Sampling Distributions
CHAPTER 6 Random Variables
CHAPTER 6 Random Variables
AP Statistics Chapter 16 Notes.
Random Variables Random variable a variable (typically represented by x) that takes a numerical value by chance. For each outcome of a procedure, x takes.
CHAPTER 6 Random Variables
Bernoulli Trials Two Possible Outcomes Trials are independent.
12/12/ A Binomial Random Variables.
Chapter 8: Binomial and Geometric Distributions
6.1 Construct and Interpret Binomial Distributions
A statistic from a random sample or randomized experiment is a random variable. The probability distribution of this random variable is called its sampling.
Chapter 5: Sampling Distributions
Presentation transcript:

Week 8 Chapter 14. Random Variables

Random Variable A random variable (r. v.) is a variable whose value is a numerical outcome of a random phenomenon. Consider the voting outcome of an eligible voter in an electoral campaign. Define a random variable as follows: X = 1 if they choose a particular candidate X = 0 if they don’t choose a particular candidate. This is an example of a Bernoulli r.v. Probability function of X p + (1 – p) = 1 x P(X = x) 1 – p 1 p

Probability Distributions Each value of a random variable is an event, so each value has probability. List of values and probabilities called probability model. For example, recall Tim Horton’s Roll Up the Rim contest: P (Win) = 1/6 so, P(Lose) = 5/6 Possible Sample (n = 3 cups) x P(x) W, W, W 3 1/6 x 1/6 x 1/6 = 1/216 = 0.005 W, W, L 2 1/6 x 1/6 x 5/6 = 5/216 = 0.023 W, L, W 1/6 x 5/6 x 1/6 = 5/216 = 0.023 W, L, L 1 1/6 x 5/6 x 5/6 = 25/216 = 0.116 L, L, W 5/6 x 5/6 x 1/6 = 25/216 = 0.116 L, W, L 5/6 x 1/6 x 5/6 = 25/216 = 0.116 L, W, W 5/6 x 1/6 x 1/6 = 5/216 = 0.023 L, L, L 5/6 x 5/6 x 5/6 = 125/216 = 0.579   Sum of Probabilities = 1

Example of Probability Distribution For example, recall Tim Horton’s Roll Up the Rim contest: P (Win) = 1/6 so, P(Lose) = 5/6 x P(x) 1 x 0.579 = 0.579 1 3 x 0.116 = 0.348 2 3 x 0.023 = 0.069 3 1 x 0.005 = 0.005

Combining Values of Random Variable For example, recall Tim Horton’s Roll Up the Rim contest: P (Win) = 1/6 so, P(Lose) = 5/6 x P(x) 1 x 0.579 = 0.579 1 3 x 0.116 = 0.348 2 3 x 0.023 = 0.069 3 1 x 0.005 = 0.005 How likely are we to get two or more winning cups? add up probabilities: p(2) + p(3) = 0.069 + 0.005 = 0.074 How likely to get at least one winning cup? p(no winning cups)= p(0) = 0.579, so, P(at least one winning cup)=1 – p(0) = 1 – 0.579 = 0.421 or: P(1 or 2 or 3)= 0.348 + 0.069 + 0.005 = 0.422

The Mean of a Random Variable Recall the example: Spending evenings with neighbors. Let x be a random variable denoting outcomes: 1, 2, 3, 4, 5, 6, 7 Mean of x is not (1+2+3+4+5+6+7)/7 = 28/7 = 4, because for example 7 is more likely than 1 or 6. Therefore, we have to account for more likely values when adding up; that means that we times by probability: Mean (x) = 1(0.058) + 2(0.183) + 3(0.116) + 4(0.147) + 5(0.126) + 6(0.094) + 7(0.277) = 4.493 We have a weighted averages; weights (probabilities) sum to 1. Median is value of x where summed-up probabilities first pass 0.5: 3 too small, because total: 0.058 + 0.183 + 0.116 = 0.424 4 is right, because total: 0.058 + 0.183 + 0.116 + 0.147 = 0.571 so, median (x) = 4 Mean is a little bigger than median: right-skewed. x P(x) 1: Almost Daily 0.058 2: Several Times A Week 0.183 3: Several Times A Month 0.116 4: Once A Month 0.147 5: Several Times A Year 0.126 6: Once A Year 0.094 7: Never 0.277

The Variance and SD of a Random Variable The variance of a discrete (it means countable) r. v. is: Var (X) = 𝜎 2 = 𝑋 − 𝜇 2 𝑃(𝑋) The standard deviation of a r. v. is the positive square root of its variance. SD(X) = Var (X) = 𝜎 2 = 𝜎 Recall the example spending evening with neighbors: 𝜇= mean (x) = 4.49 𝜎 2 = 𝑋 − 𝜇 2 𝑃(𝑋) = 1 −4.49 2 0.058 + 2 −4.49 2 0.183 + 3 −4.49 2 0.116 + 4 −4.49 2 0.147 + 5 −4.49 2 0.126 + 6 −4.49 2 0.094 + 7 −4.49 2 0.277 = 4.12 𝜎 = 𝜎 2 =4.12 = 2.03 x P(x) 1: Almost Daily 0.058 2: Several Times A Week 0.183 3: Several Times A Month 0.116 4: Once A Month 0.147 5: Several Times A Year 0.126 6: Once A Year 0.094 7: Never 0.277

Continuous Random Variable So far, our random variables were discrete: set of possible values, like 1,2,3,... , probability for each. Recall normal distribution: any decimal value is possible; we can't talk about probability of any one value, because we are interested in areas of a certain region. e.g., “less than 10”, “between 10 and 15”, “greater than 15”. Normal random variable is an example of continuous r.v. Finding mean and SD of continuous random variable involves calculus; but in this course we work with given mean and SD of for example normal distributions. However, the same formulas in the previous slide hold for obtaining mean and SD of continuous r.v.

The Binomial Model 1. There are a fixed number n of observations. 2. The n observations are independent. 3. Each observation falls into one of just two categories (successes and failures). 4. The probability of a success (call it p) is the same for each observation. Probability function of the binomial distribution. If X has a B(n, p), 𝑃 𝑋=𝑥 = 𝑛 𝑥 𝑝 𝑥 (1−𝑝) 𝑛−𝑥 for 𝑥=0,…,𝑛 𝑛 𝑥 is referred to as n choose x: different order in which we can have x success in n trials 𝑛 𝑥 = 𝑛! 𝑥!(𝑛−𝑥)! Calculator: for 𝑛 𝑥 use the nCr button on your calculator (r is the x in our case). There might 𝑝: probability of success 1−𝑝: probability of failure (not success) Mean (X) = 𝑛𝑝 Var(X) = 𝑛𝑝(1−𝑝) and SD(X) = 𝑛𝑝(1−𝑝)

The Binomial Table On our portal page for the course, the Statistical Tables folder includes statistical tables of binomial distribution (see pages 3 and 4). Based on the table, find chance of exactly k successes in n trials with success probability p.

The Binomial Table and Example The probability that a certain machine will produce a defective item is 1/5. If a random sample of 6 items is taken from the output of this machine, what is the probability that there will be 5 or more defectives in the sample? X ~ Binomial (n = 6, p = 1/5 = 0.20) x can take values: 0, 1, 2, 3, 4, 5, 6 We need to find p(5 or 6) = p(5) + p(6) We can use the binomial table: 0.0015 + 0.0001 = 0.0016

The Binomial Table and Example The probability that a certain machine will produce a defective item is 1/5. If a random sample of 6 items is taken from the output of this machine, what is the probability that there will be at most 5 defectives in the sample? At most 5 means: 5 or less X ~ Binomial (n = 6, p = 1/5 = 0.20) x can take values: 0, 1, 2, 3, 4, 5, 6 We need to find: p(x less than and equal to 5) = p(0) + p(1) + p(2) + p(3) + p(4) + p(5) Or, we can use the idea of the complement of the event; that is, we find: 1 – p(6: all 6 are defective) For p(6), we can refer to the binomial table: P(6) = 0.0001; So, 1 – p(6) = 1 – 0.0001 = 0.9999

The Mean and SD of Binomial Example The probability that a certain machine will produce a defective item is 1/5. Suppose a random sample of 6 items is taken from the output of this machine. What are the mean and the standard deviation of the number of defective items among the 6 items? X ~ Binomial (n = 6, p = 1/5 = 0.20) Mean (X) = 𝑛𝑝 = 6 x 0.20 = 1.2 Var(X) = 𝑛𝑝(1−𝑝) = 6 x 0.20 x (1 – 0.2) = 0.96 and SD(X) = 𝑛𝑝(1−𝑝) = 0.96 = 0.98

Another Binomial Example People with O-negative blood type are “universal donors”. Only 6% of people have this blood type. Suppose twenty people are randomly selected. What is the probability that exactly two of them are universal donors (have o-negative blood type)? X ~ Binomial (n = 20, p = 0.06) P(X=2) = 20 2 0.062(1-0.06)20-2 = 190 * 0.0036 * 0.3283 ≅0.2246 We can do this using StatCrunch.

Normal Approximation to Binomial Distribution How does the shape depend on p? p<0.5, skewed right; p>0.5, skewed left; p=0.5, symmetric What happens to the shape as n increases? − shape becomes normal What does this suggest to do if n is too large for the tables? If n too large for tables, try normal approximation to binomial. Compute mean and SD of binomial, then pretend binomial actually normal.

Normal Approximation to Binomial Distribution - Example People with O-negative blood type are “universal donors”. Only 6% of people have this blood type. Suppose 1000 people are randomly selected. Find the probability that there are more than 50 universal donors among 1000 people? X ~ Binomial (n = 1000, p = 0.06) P(50 or more) = ??? By hand calculation is tedious Table does not give information pass n=20 What do we do?

Normal Approximation to Binomial Distribution – Example People with O-negative blood type are “universal donors”. Only 6% of people have this blood type. Suppose 1000 people are randomly selected. Find the probability that there are more than 50 universal donors among 1000 people? X ~ Binomial (n = 1000, p = 0.06) P(50 or more) = ??? Normal distribution to the rescue    X ~ N (mean=np, SD= 𝒏𝒑(𝟏−𝒑) ) The mean and SD are from binomial distribution Check: Normal approximation to the Binomial distribution: np ≥𝟏𝟎 n(1-p) ≥𝟏𝟎

Normal Approximation to Binomial Distribution - Example People with O-negative blood type are “universal donors”. Only 6% of people have this blood type. Suppose 1000 people are randomly selected. Find the probability that there are more than 50 universal donors among 1000 people? Check: Normal approximation to the Binomial distribution: np = 1000*0.06 = 60>10 n(1-p) = 1000*0.94 = 940>10 We can use normal approximation to the binomial. X ~ Binomial (n = 1000, p = 0.06) Mean (X) = 𝑛𝑝 = 1000 x 0.06 = 60 SD(X) = 𝑛𝑝(1−𝑝) = 1000𝑥0.06𝑥0.94 = 7.51 X ~ N(mean=1000x0.06=60, SD= 1000𝑋0.06𝑋0.94 =7.51) P(X > 50 ) = P( Z > 𝟓𝟎−𝟔𝟎 𝟕.𝟓𝟏 ) = 𝒑 𝒛>−𝟏.𝟑𝟑 = (proportion above z of -1.33) =𝟏−𝒑(𝒛<−𝟏.𝟑𝟑) = 1 – (prop below z of -1.33) = 1- 0.0918 = 0.9082 About 91% of the time, we find 50 or more universal donors among 1000 people.