Random Variables Presentation 6.. Random Variables A random variable assigns a number (or symbol) to each outcome of a random circumstance. A random variable.

Slides:



Advertisements
Similar presentations
Normal Distribution; Sampling Distribution; Inference Using the Normal Distribution ● Continuous and discrete distributions; Density curves ● The important.
Advertisements

Probability & Statistical Inference Lecture 3
Copyright ©2011 Brooks/Cole, Cengage Learning Random Variables Chapter 8 1.
Chapter 5 Basic Probability Distributions
Probability Densities
Statistical Inference Most data comes in the form of numbers We have seen methods to describe and summarise patterns in data. Most data are samples (subsets)
Review.
Chapter 6 Continuous Random Variables and Probability Distributions
Probability Distributions
Statistics Lecture 14. Example Consider a rv, X, with pdf Sketch pdf.
Probability Distributions Random Variables: Finite and Continuous Distribution Functions Expected value April 3 – 10, 2003.
Continuous Random Variables and Probability Distributions
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
Modeling Random Events: The Normal and Binomial Models
Discrete and Continuous Probability Distributions.
Chapter 21 Random Variables Discrete: Bernoulli, Binomial, Geometric, Poisson Continuous: Uniform, Exponential, Gamma, Normal Expectation & Variance, Joint.
Fall 2013Biostat 5110 (Biostatistics 511) Week 7 Discussion Section Lisa Brown Medical Biometry I.
PROBABILITY DISTRIBUTIONS
Chapter 6: Random Variables
Chapter 1 Probability and Distributions Math 6203 Fall 2009 Instructor: Ayona Chatterjee.
Chapter 7 Random Variables I can find the probability of a discrete random variable. 6.1a Discrete and Continuous Random Variables and Expected Value h.w:
Probability Quantitative Methods in HPELS HPELS 6210.
Chapter 6: Probability Distributions
1 If we can reduce our desire, then all worries that bother us will disappear.
PROBABILITY & STATISTICAL INFERENCE LECTURE 3 MSc in Computing (Data Analytics)
Chapter 6: Probability Distributions
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. 1 PROBABILITIES FOR CONTINUOUS RANDOM VARIABLES THE NORMAL DISTRIBUTION CHAPTER 8_B.
1 Normal Random Variables In the class of continuous random variables, we are primarily interested in NORMAL random variables. In the class of continuous.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.1 Discrete and Continuous Random Variables.
Probability The definition – probability of an Event Applies only to the special case when 1.The sample space has a finite no.of outcomes, and 2.Each.
Theory of Probability Statistics for Business and Economics.
Dan Piett STAT West Virginia University Lecture 7.
Random Variables Numerical Quantities whose values are determine by the outcome of a random experiment.
The Practice of Statistics, 5th Edition Starnes, Tabor, Yates, Moore Bedford Freeman Worth Publishers CHAPTER 6 Random Variables 6.1 Discrete and Continuous.
1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Chapter 6. Continuous Random Variables Reminder: Continuous random variable.
Chapter 6 Random Variables
Modular 11 Ch 7.1 to 7.2 Part I. Ch 7.1 Uniform and Normal Distribution Recall: Discrete random variable probability distribution For a continued random.
5.3 Random Variables  Random Variable  Discrete Random Variables  Continuous Random Variables  Normal Distributions as Probability Distributions 1.
Copyright © 2014 Pearson Education, Inc. All rights reserved Chapter 6 Modeling Random Events: The Normal and Binomial Models.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 6 Probability Distributions Section 6.2 Probabilities for Bell-Shaped Distributions.
1 Since everything is a reflection of our minds, everything can be changed by our minds.
Copyright © 2014, 2013, 2010 and 2007 Pearson Education, Inc. Chapter The Normal Probability Distribution 7.
1 Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved. Chapter 6 Continuous Random Variables.
Lesson 6 - R Discrete Probability Distributions Review.
Sample Means & Proportions
Random Variables Learn how to characterize the pattern of the distribution of values that a random variable may have, and how to use the pattern to find.
+ The Practice of Statistics, 4 th edition – For AP* STARNES, YATES, MOORE Chapter 6: Random Variables Section 6.1 Discrete and Continuous Random Variables.
Probability Theory Modelling random phenomena. Permutations the number of ways that you can order n objects is: n! = n(n-1)(n-2)(n-3)…(3)(2)(1) Definition:
1 Keep Life Simple! We live and work and dream, Each has his little scheme, Sometimes we laugh; sometimes we cry, And thus the days go by.
THE NORMAL DISTRIBUTION
Copyright ©2011 Brooks/Cole, Cengage Learning Continuous Random Variables Class 36 1.
Theoretical distributions: the Normal distribution.
Random Variables Random variables assigns a number to each outcome of a random circumstance, or equivalently, a random variable assigns a number to each.
Random Variables Random variables assigns a number to each outcome of a random circumstance, or equivalently, a random variable assigns a number to each.
Chapter 6: Random Variables
Chapter 6. Continuous Random Variables
Section 5.1 Basic Ideas.
BIOS 501 Lecture 3 Binomial and Normal Distribution
Chapter 6: Random Variables
Chapter 6: Random Variables
12/6/ Discrete and Continuous Random Variables.
Chapter 6: Random Variables
Chapter 6: Random Variables
Chapter 6: Random Variables
Chapter 6: Random Variables
Chapter 6: Random Variables
Chapter 6: Random Variables
Chapter 6: Random Variables
Chapter 6: Random Variables
Chapter 6: Random Variables
Presentation transcript:

Random Variables Presentation 6.

Random Variables A random variable assigns a number (or symbol) to each outcome of a random circumstance. A random variable assigns a number (or symbol) to each outcome of a random circumstance. Example: Lets call our random variable X! 1.Let X = the number of spades in a random sample of 4 cards from a deck. 2.Let X = the sum of 2 rolls of a six sided die. 3.Let X = the number of people with blue eyes in a sample of 10 people. 4.Let X = the weight of a randomly chosen person.

Two types of Quantitative R. Vs Discrete Random Variables Discrete Random Variables Result in a countable set of possibilities (e.g. only integer values.) Result in a countable set of possibilities (e.g. only integer values.) Cannot take any possible value in an interval (since there are uncountable many values in an interval). Cannot take any possible value in an interval (since there are uncountable many values in an interval).Examples: 1. X = the sum of 2 rolls of a six sided die. Outcomes: X = number of tosses until the first “head”. Outcomes: 1,2,3,… Continuous Random Variables Continuous Random Variables The outcome can be in any interval or collection of intervals. The outcome can be in any interval or collection of intervals.Examples: 1. X = Time spent waiting for the bus. 2. X = the weight of a randomly chosen individual. Outcomes: 120 lbs, lbs, lbs,… Outcomes: 120 lbs, lbs, lbs,…

Probability Notation and Distributions X = the random variable. X = the random variable. k = a number that the discrete r.v. could assume (a possible outcome!) k = a number that the discrete r.v. could assume (a possible outcome!) P(X=k) is the probability that X equals k. P(X=k) is the probability that X equals k. The probability distribution function (PDF) for a discrete random variable is a table or rule that assigns probabilities to the possible outcomes of a random variable X. The probability distribution function (PDF) for a discrete random variable is a table or rule that assigns probabilities to the possible outcomes of a random variable X. Discrete Random Variables

Example Assume the probability of a girl is ½. Let X = the number of girls in a family with 3 children. What is the probability distribution of X? Possible Outcomes: 0, 1, 2, or 3 girls. Event: BBB BBG BGB GBB BGG GBG GGB GGG Prob: 1/81/81/81/81/81/81/81/8 X: k0123 P(X=k)1/83/83/81/8 PDF of X: Discrete Random Variables

Cumulative Distribution Function The Cumulative Distribution Function for a random variable X is rule or table that provides the probabilities P(X ≤ k). The term ‘cumulative probability’ refers to the probability that X is less than or equal to a particular value. The Cumulative Distribution Function for a random variable X is rule or table that provides the probabilities P(X ≤ k). The term ‘cumulative probability’ refers to the probability that X is less than or equal to a particular value. Example: Number of Girls k0123 P(X≤k)1/84/87/81 CDF of X: Discrete Random Variables

Expectations The expected value of a random variable is the mean value of the variable X in the space of possible outcomes (or population). Also can be interpreted as the mean value from an infinite number of observations of the random variable. It is also denoted with the Greek letter μ. The expected value of a random variable is the mean value of the variable X in the space of possible outcomes (or population). Also can be interpreted as the mean value from an infinite number of observations of the random variable. It is also denoted with the Greek letter μ. E(X) = μ = E(X) = μ = So the expected value of the number of girls is E(X)= μ = 0*1/8 + 1*3/8 + 2*3/8 + 3*1/8 E(X)= μ = 0*1/8 + 1*3/8 + 2*3/8 + 3*1/8 = 3/8+6/8+3/8 = 3/8+6/8+3/8 = 12/8 or 1.5 girls! = 12/8 or 1.5 girls! Discrete Random Variables

Special Case of Discrete Random Variables: Binomial Random Variables Binomial Experiment is defined by the following: There are n “trials” where n is determined in advance. There are n “trials” where n is determined in advance. There are two possible outcomes on each trial, a “success”, and a “failure”. There are two possible outcomes on each trial, a “success”, and a “failure”. The outcomes are independent from one trial to the next. The outcomes are independent from one trial to the next. The probability of a “success” remains the same from one trial to the next and is denoted by p. The probability of a “success” remains the same from one trial to the next and is denoted by p.

If we have a Binomial experiment with n trials and p probability of success, then X= number of successes (out of n trials), is called a binomial random variable. If we have a Binomial experiment with n trials and p probability of success, then X= number of successes (out of n trials), is called a binomial random variable. What is the sample space of X? What is the sample space of X? Example: Drawing 10 cards from a deck with replacement and counting the number of spades. Example: Drawing 10 cards from a deck with replacement and counting the number of spades. Then, we have the binomial random variable X = ______________________________ X = ______________________________ sample space of X = ________________ sample space of X = ________________ Binomial Random Variables

PDF, Expectation, and Standard Deviation of a Binomial Random Variable P(X=k) = E(X) = μ = S.D.(X) = σ = Note: n! = 1x2x … xn, e.g. 3!=1x2x3=6 kn!/[k!(n-k)!] p k (1-p) n-k P(X=k)03!/[0!*3!]=1.5 0 (1-.5) 3 =1/8 1/8 13!/[1!*2!]=3.5 1 (1-.5) 2 =1/8 3/8 23!/[2!*1!]=3.5 2 (1-.5)1=1/8 3/8 33!/[3!*0!]=1.5 3 (1-.5) 0 =1/8 1/8 Example: Number of Girls

Example Binomial: Number of Spades in 10 draws:

Special Case of Continuous Random Variables: Normal Random Variables In the class of continuous random variables, we are primarily interested in NORMAL random variables. In the class of continuous random variables, we are primarily interested in NORMAL random variables. These are a continuous random variable with a bell-shaped distribution. These normal or bell-shaped variables occur often in nature. These are a continuous random variable with a bell-shaped distribution. These normal or bell-shaped variables occur often in nature. Example: Heights of Males are Normally Distributed are Normally Distributed Probability Density Function forHeights of Males ---> forHeights of Males --->

Probabilities with Normal RVs When we consider Normal Random Variables (or any continuous r.v.), we are interested in the probability that X falls into some INTERVAL. When we consider Normal Random Variables (or any continuous r.v.), we are interested in the probability that X falls into some INTERVAL. There are infinitely many normal pdf’s (curves). To fully describe a normal curve, we need the location (mean, μ) and the spread (s.d., σ). There are infinitely many normal pdf’s (curves). To fully describe a normal curve, we need the location (mean, μ) and the spread (s.d., σ). When talking about the population mean and s.d. we use the Greek letters μ and σ, when talking about the sample mean and s.d. we use and s. When talking about the population mean and s.d. we use the Greek letters μ and σ, when talking about the sample mean and s.d. we use and s. Example: Suppose X is the height of a randomly chosen college woman. Further suppose that the heights of college women can be described as a normal, with μ = 65inches, and σ = 2.7 inches. We might ask: 1.What is the proportion of women that are shorter than 62 inches? 2.What is the probability that X is between 65 and 67 inches?

Graphical Representation of Probabilities P(X<62) P(65<X<67) Note: The total area under the curve is equal to 1!

How to Calculate Probabilities If you want P(X<x) where x equals some value, first compute a z-score! z = (Value – mean)/(Standard Deviation) z = (Value – mean)/(Standard Deviation) z = (x- µ )/σ, P(X<x) = P(Z<z) for which we have tables!! z = (x- µ )/σ, P(X<x) = P(Z<z) for which we have tables!!Examples: 1. P(X<62) z = (62 – 65)/2.7 = -3/2.7 = z = (62 – 65)/2.7 = -3/2.7 = P(X<62) = P(Z < -1.11), now use Normal Table P(X<62) = P(Z < -1.11), now use Normal Table (Table A.1, page 538 in your text) (Table A.1, page 538 in your text) P(Z< -1.11) = 13.4% P(Z< -1.11) = 13.4% 2. P(65<X<67) z1 = (65 – 65)/2.7 = 0, z2 = (67 – 65)/2.7 = 1.11 z1 = (65 – 65)/2.7 = 0, z2 = (67 – 65)/2.7 = 1.11 P(65<X<67) = P(0<Z<1.11) = P(Z<1.11) – P(Z<0) P(65<X<67) = P(0<Z<1.11) = P(Z<1.11) – P(Z<0) P(Z<1.11) – P(Z<0) =.867 –.5 =.367 or 36.7% P(Z<1.11) – P(Z<0) =.867 –.5 =.367 or 36.7% 3. P(X>62) = 1- P(X 62) = 1- P(X<62) = = 0.866

Some notes for calculating probabilities 1. The normal table provides probabilities of the form P(Z<“number”). 2. For continuous random variables the probability of being less than or less of equal than a number are the same. ( e.g. P(Z<2.1) = P(Z  2.1) ) 3. It is always a good idea to draw a normal curve and shade the area corresponding to the probability of interest. 4. If c, c1, c2 are some numbers, then P(Z>c) = 1 – P(Z c) = 1 – P(Z<c) P(c1<Z<c2) = P(Z<c2) - P(Z<c1) P(c1<Z<c2) = P(Z<c2) - P(Z<c1) Draw a normal curve and shade the areas corresponding to the above probabilities. Can you see why we have these equalities? Draw a normal curve and shade the areas corresponding to the above probabilities. Can you see why we have these equalities?

Example: Suppose verbal SAT scores of high-school freshman are normally distributed with a mean of 500 and a standard deviation of 50. What is the probability of a randomly chosen individual having a score greater than 600? What is the probability of a randomly chosen individual having a score greater than 600? z-score = [ ]/50 = 2 z-score = [ ]/50 = 2 P(X>600) = P(Z>2) = 1- P(Z  2)= 1-P(Z 600) = P(Z>2) = 1- P(Z  2)= 1-P(Z<2) = = Note that the only difference in the two graphs below is the scale on the tow axes. However, the shaded areas are equal…since the total area under any of this curves is one. Note that the only difference in the two graphs below is the scale on the tow axes. However, the shaded areas are equal…since the total area under any of this curves is one. P(X>600)P(Z>2)

What is the probability of a randomly chosen individual having a score between 400 and 500? What is the probability of a randomly chosen individual having a score between 400 and 500? We want P(400<X<500). We want P(400<X<500). z-score1 = z1 = [ ]/50 = -2 z-score1 = z1 = [ ]/50 = -2 z-score2 = z2 = [ ]/50 = 0 z-score2 = z2 = [ ]/50 = 0 P(400<X<500) = P(-2 < Z < 0) P(400<X<500) = P(-2 < Z < 0) = P(Z<0) – P(Z<-2) = =.4772 (from Table) = P(Z<0) – P(Z<-2) = =.4772 (from Table) That is the probability of a randomly chosen student having a score between 400 and 500 is about.48 or 48%. P(-2<Z<0)

What is the probability of a randomly chosen individual having a score between 350 and 450? What is the probability of a randomly chosen individual having a score between 350 and 450? z-score1 = z1 = [ ]/50 = -3 z-score1 = z1 = [ ]/50 = -3 z-score2 = z2 = [ ]/50 = -1 z-score2 = z2 = [ ]/50 = -1 P(350<X<450) = P(-3 < Z < -1) P(350<X<450) = P(-3 < Z < -1) = P(Z<-1) – P(Z<-3) = P(Z<-1) – P(Z<-3) = =.1574 (from normal Table) = =.1574 (from normal Table) That is the probability of a randomly chosen student having a score between 350 and 450 is about.16 or 16%. P(-3<Z<-1)

Approximating binomial distribution probabilities Suppose X is a binomial distribution with trials n and success probability p. Suppose X is a binomial distribution with trials n and success probability p. >10 and >10 >10 and >10 (i.e. the expected number of both, successes and failures, in the sample is greater than 10.) (i.e. the expected number of both, successes and failures, in the sample is greater than 10.) X is approximately a normal random variable with mean  = and standard deviation  = X is approximately a normal random variable with mean  = and standard deviation  =

Normal appr. of binomial variables Let X be a binomial distribution with n=20 and p=0.5. Check if the approximation rules are satisfied? Check if the approximation rules are satisfied? What is the mean and the s.d. of X? What is the mean and the s.d. of X? Compute P(X≤10) by two ways: Compute P(X≤10) by two ways: 1. Using minitab to compute P(X≤10) where X is a binomial r.v. with n=20 and p=0.5, we get P(X≤10) = Using normal approximation: for X a normal r.v. with μ=______ and σ=________ we get P(X≤10)=0.5

Summary Definitions and theory for binomial rv’s If X is a r.v. representing the number of successes in n independent, identical trials, with probability of success p remaining constant from trial to trial, then is called a binomial r.v. with parameters n and p. If X is a r.v. representing the number of successes in n independent, identical trials, with probability of success p remaining constant from trial to trial, then is called a binomial r.v. with parameters n and p. The cumulative density function (cdf) of X is P(X ≤ k), for all k. The cumulative density function (cdf) of X is P(X ≤ k), for all k. For k integer between 0 and n we have that For k integer between 0 and n we have that P(X < k) = P(X ≤ k-1) P(X < k) = P(X ≤ k-1) Note that is not true for discrete random variables in general!!! Binomial random variables can take only the integer values 0,1,…,n (since is the number of successes out of n). If X is not a binomial variable it might be the case that the possible values of X are 2, 2.5, 3, 3.5 and 4. Then, in this case P(X < 3) = P(X ≤ 2.5). Note that is not true for discrete random variables in general!!! Binomial random variables can take only the integer values 0,1,…,n (since is the number of successes out of n). If X is not a binomial variable it might be the case that the possible values of X are 2, 2.5, 3, 3.5 and 4. Then, in this case P(X < 3) = P(X ≤ 2.5). For a binomial random variable X with n number of trial and p prob. of success For a binomial random variable X with n number of trial and p prob. of success μ = E(X) = μ = E(X) = σ = σ = So…for binomial random variables you do not need to use the general formula for the expected value of discrete r.v.’s! So…for binomial random variables you do not need to use the general formula for the expected value of discrete r.v.’s!

Summary Definitions and theory for Normal r.v’s. Knowing μ and σ, specifies the particular normal distribution out of the class of all normal distributions. (Similarly, knowing n and p, specifies a particular binomial distribution.) Knowing μ and σ, specifies the particular normal distribution out of the class of all normal distributions. (Similarly, knowing n and p, specifies a particular binomial distribution.) The pdf of any normal r.v X, also called normal curve, is s ymmetric, bell shaped and centered at the mean, μ. The pdf of any normal r.v X, also called normal curve, is s ymmetric, bell shaped and centered at the mean, μ. The standard normal random variable has mean 0 and standard deviation 1. We denote it with Z. The standard normal random variable has mean 0 and standard deviation 1. We denote it with Z. We have the tables for all the probabilities of the form P(Z ≤ z). So, for any normal r.v X, with mean μ and standard deviation σ, we can obtain any probabilities of interest using the following “standardization theorem’. We have the tables for all the probabilities of the form P(Z ≤ z). So, for any normal r.v X, with mean μ and standard deviation σ, we can obtain any probabilities of interest using the following “standardization theorem’. If X has a normal distribution with mean μ, and standard deviation σ, then If X has a normal distribution with mean μ, and standard deviation σ, then {(X- μ)/ σ } has a normal distribution with mean 0, and standard deviation 1, {(X- μ)/ σ } has a normal distribution with mean 0, and standard deviation 1, P(X ≤ x) = P [(X- μ)/ σ ≤ (x- μ)/ σ] = P[Z ≤ (x- μ)/ σ] = P(Z ≤ z), Where z = (x- μ)/ σ, is called the z-score of x. Where z = (x- μ)/ σ, is called the z-score of x.

Summary Finding Probabilities of X First find the z-score of x (or x’s if more than one) to be able to use the tables. First find the z-score of x (or x’s if more than one) to be able to use the tables. Think what is the area under the curve that corresponds to this probability. Think what is the area under the curve that corresponds to this probability. Figure out how you can get this probability using probabilities rules and Figure out how you can get this probability using probabilities rules and values form the tables. values form the tables. Have in mind that the normal curve is symmetric and that the total area under Have in mind that the normal curve is symmetric and that the total area under the curve is equal to 1. the curve is equal to 1. The empirical rule for the standard deviation on page 44, is valid for all bell- shaped distributions (μ ± σ, μ ± 2σ, μ ± 3σ, approximate intervals), but it is EXACTLY RIGHT in the case of normal distribution. i.e. The empirical rule for the standard deviation on page 44, is valid for all bell- shaped distributions (μ ± σ, μ ± 2σ, μ ± 3σ, approximate intervals), but it is EXACTLY RIGHT in the case of normal distribution. i.e. P(-1<Z<1) = _______, P(-2<Z<2) = _______, P(-3<Z<3) = ________ How can we find percentiles? How can we find percentiles? i.e. for a normal r.v. X with mean μ and standard deviation σ, how can we find x (a value of X), such that P( X ≤ x) = α, where α is α known probability. i.e. for a normal r.v. X with mean μ and standard deviation σ, how can we find x (a value of X), such that P( X ≤ x) = α, where α is α known probability. e.g. if α = 95% (we want to find the 95 th percentile of X). e.g. if α = 95% (we want to find the 95 th percentile of X). First we get the α-th percentile for Z, First we get the α-th percentile for Z, P(Z≤ z) = 0.95, then z = P(Z≤ z) = 0.95, then z = and we get x using and we get x using x= σ z + μ x= σ z + μ