Random Variables. Chapter 2. Random Variables 1



Similar documents
WEEK #22: PDFs and CDFs, Measures of Center and Spread

Chapter 4 Lecture Notes

BNG 202 Biomechanics Lab. Descriptive statistics and probability distributions I

Joint Exam 1/P Sample Exam 1

Definition: Suppose that two random variables, either continuous or discrete, X and Y have joint density

Chapter 4 - Lecture 1 Probability Density Functions and Cumul. Distribution Functions

ST 371 (IV): Discrete Random Variables

University of California, Los Angeles Department of Statistics. Random variables

AMS 5 CHANCE VARIABILITY

Math 425 (Fall 08) Solutions Midterm 2 November 6, 2008

Example. A casino offers the following bets (the fairest bets in the casino!) 1 You get $0 (i.e., you can walk away)

7 CONTINUOUS PROBABILITY DISTRIBUTIONS

MA 1125 Lecture 14 - Expected Values. Friday, February 28, Objectives: Introduce expected values.

For a partition B 1,..., B n, where B i B j = for i. A = (A B 1 ) (A B 2 ),..., (A B n ) and thus. P (A) = P (A B i ) = P (A B i )P (B i )

Thursday, November 13: 6.1 Discrete Random Variables

Statistics 100A Homework 3 Solutions

Exploratory Data Analysis

Summary of Formulas and Concepts. Descriptive Statistics (Ch. 1-4)

Elementary Statistics and Inference. Elementary Statistics and Inference. 17 Expected Value and Standard Error. 22S:025 or 7P:025.

Introduction to Probability

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 13. Random Variables: Distribution and Expectation

Example: Find the expected value of the random variable X. X P(X)

3.2 Roulette and Markov Chains

STT315 Chapter 4 Random Variables & Probability Distributions KM. Chapter 4.5, 6, 8 Probability Distributions for Continuous Random Variables

X: Probability:

Notes on Continuous Random Variables

Probability Distribution for Discrete Random Variables

Section 7C: The Law of Large Numbers

13.0 Central Limit Theorem

$ ( $1) = 40

The Normal Distribution. Alan T. Arnholt Department of Mathematical Sciences Appalachian State University

Statistics and Random Variables. Math 425 Introduction to Probability Lecture 14. Finite valued Random Variables. Expectation defined

Mathematical Expectation

Random variables P(X = 3) = P(X = 3) = 1 8, P(X = 1) = P(X = 1) = 3 8.

The Math. P (x) = 5! = = 120.

Center: Finding the Median. Median. Spread: Home on the Range. Center: Finding the Median (cont.)

Elementary Statistics and Inference. Elementary Statistics and Inference. 16 The Law of Averages (cont.) 22S:025 or 7P:025.

V. RANDOM VARIABLES, PROBABILITY DISTRIBUTIONS, EXPECTED VALUE

Lecture 6: Discrete & Continuous Probability and Random Variables

MATH 10: Elementary Statistics and Probability Chapter 5: Continuous Random Variables

Chapter 16: law of averages

An Introduction to Basic Statistics and Probability

Lecture 7: Continuous Random Variables

Lecture 3: Continuous distributions, expected value & mean, variance, the normal distribution

Probability and Statistics Vocabulary List (Definitions for Middle School Teachers)

Chapter 16. Law of averages. Chance. Example 1: rolling two dice Sum of draws. Setting up a. Example 2: American roulette. Summary.

5. Continuous Random Variables

Section 6.1 Discrete Random variables Probability Distribution

Math 370, Actuarial Problemsolving Spring 2008 A.J. Hildebrand. Practice Test, 1/28/2008 (with solutions)

MAS108 Probability I

Exploratory data analysis (Chapter 2) Fall 2011

Betting on Excel to enliven the teaching of probability

You flip a fair coin four times, what is the probability that you obtain three heads.

The sample space for a pair of die rolls is the set. The sample space for a random number between 0 and 1 is the interval [0, 1].

Probability: The Study of Randomness Randomness and Probability Models. IPS Chapters 4 Sections

Problem sets for BUEC 333 Part 1: Probability and Statistics

Department of Mathematics, Indian Institute of Technology, Kharagpur Assignment 2-3, Probability and Statistics, March Due:-March 25, 2015.

Chapter 5. Random variables

36 Odds, Expected Value, and Conditional Probability

Math 431 An Introduction to Probability. Final Exam Solutions

The overall size of these chance errors is measured by their RMS HALF THE NUMBER OF TOSSES NUMBER OF HEADS MINUS NUMBER OF TOSSES

THE CENTRAL LIMIT THEOREM TORONTO

Statistics 151 Practice Midterm 1 Mike Kowalski

3: Summary Statistics

Section 1.3 Exercises (Solutions)

Continuous Random Variables

Math 370/408, Spring 2008 Prof. A.J. Hildebrand. Actuarial Exam Practice Problem Set 5 Solutions

Betting systems: how not to lose your money gambling

Mind on Statistics. Chapter 8

We rst consider the game from the player's point of view: Suppose you have picked a number and placed your bet. The probability of winning is

Partial Solutions for Assignment 1

STATS8: Introduction to Biostatistics. Data Exploration. Babak Shahbaba Department of Statistics, UCI

Econ 132 C. Health Insurance: U.S., Risk Pooling, Risk Aversion, Moral Hazard, Rand Study 7

MEASURES OF VARIATION

Covariance and Correlation

Statistics 1. Revision Notes

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

CA200 Quantitative Analysis for Business Decisions. File name: CA200_Section_04A_StatisticsIntroduction

STA 256: Statistics and Probability I

Dongfeng Li. Autumn 2010

THE BINOMIAL DISTRIBUTION & PROBABILITY

Variables. Exploratory Data Analysis

Without data, all you are is just another person with an opinion.

A Primer on Mathematical Statistics and Univariate Distributions; The Normal Distribution; The GLM with the Normal Distribution

Descriptive Statistics. Purpose of descriptive statistics Frequency distributions Measures of central tendency Measures of dispersion

Lesson 20. Probability and Cumulative Distribution Functions

Math 370/408, Spring 2008 Prof. A.J. Hildebrand. Actuarial Exam Practice Problem Set 3 Solutions

Week 1. Exploratory Data Analysis

In the situations that we will encounter, we may generally calculate the probability of an event

Automatic Bet Tracker!

Ch. 13.3: More about Probability

Topic 9 ~ Measures of Spread

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

You can place bets on the Roulette table until the dealer announces, No more bets.

CHAPTER 13 SIMPLE LINEAR REGRESSION. Opening Example. Simple Regression. Linear Regression

Manual for SOA Exam MLC.

Math 370, Spring 2008 Prof. A.J. Hildebrand. Practice Test 2 Solutions

Data Exploration Data Visualization

Chapter 1: Looking at Data Section 1.1: Displaying Distributions with Graphs

Transcription:

Random Variables Chapter 2 Random Variables 1

Roulette and Random Variables A Roulette wheel has 38 pockets. 18 of them are red and 18 are black; these are numbered from 1 to 36. The two remaining pockets are green and are numbered 0 and 00. The wheel is spun and people bet on where a small ball placed in the wheel will land. We can conduct an experiment in which we bet on a number once in Roulette with possible outcomes we win or we lose. Random Variables 2

Roulette and Random Variables Most people would probably be less interested in whether they win or lose than in how much they win or lose. We might also like to know how much we would expect to win if the experiment is repeated 5 or 6 times and how much our winnings might vary over multiple repetitions of the experiment. Random Variables 3

Roulette and Random Variables The questions 1. How much can we win or lose on a particular play? 2. How much would we expect to win if we played 5 times? 3. How much will the amount we win vary? and others can be addressed mathematically if we convert the experimental outcomes win and lose into numbers. Random Variables 4

Roulette and Random Variables A random variable assigns a numerical value to each outcome in an experiment. For instance, we could define a random variable X= the number on a pocket that the ball lands on in the roulette wheel. (We d let 0 and 00 both be counted as 0). This isn t very interesting, but we could do it. A better ideas would be to define a random variable X = the amount we win (or lose) in one $1 bet on a number in Roulette. If we lose, X=-1 (remember we bet $1) and if we win, X=35. Random Variables 5

Roulette and Random Variables Sometimes the experimental outcomes map naturally to a set of numbers. If we conduct an experiment to measure the height of a person in this class, the possible values for the random variable X = height of individual will all be between about 60 and 80 inches. At other times, the mapping is less natural, but still useful. For instance, we may conduct an experiment to determine how many members of our class watch Grey s Anatomy. The possible outcomes for each person are watches and does not watch. In this case, we can assign a 1 to the yeses and a 0 to the nos. Random Variables 6

Roulette and Random Variables Define a random variable for each of the following experimental outcomes what are the values the random variable can take on? Number of children Area of yard Favorite grocery store Temperature Sex (M, F) There are two types of random variables that are of particular interest to us. What is a natural way to classify random variables? Random Variables 7

Roulette and Random Variables The random variable associated with the roulette experiment is called discrete random variable because the number of outcomes it can assume can be counted. Some random variables correspond to outcomes that cannot be counted (e.g. things that are measured) these are called continuous random variables. Is the random variable that represents earnings in roulette discrete or continuous? What is the probability that X=-1 (the probability that we lose)? What is the probability that X=35 (the probability that we win)? Random Variables 8

The Distribution of A Discrete R.V. A random variable is usually denoted by an uppercase letter from near the end of the alphabet (e.g. X, Y, Z), while the specific values the random variable takes on are denoted by the corresponding lowercase letters. The values of a discrete random variable along with their associated probabilities constitute a probability mass function (pmf). These functions are usually represented in tables or graphs as shown below. Random Variables 9

The Distribution of A Discrete R.V. In a probability mass function, we denote the probability associated with the ith outcome x i as p i, that is P(X = x i )= p i. These values must satisfy 0 p i 1 and Σ i p i = 1. Verify that the probability mass function for the amount we win in roulette is a legitimate pmf, i.e. it satisfies the above conditions. A probability mass function is sometimes referred to as the distribution of a discrete random variable. Random Variables 10

The Distribution of A Discrete R.V. Example: Suppose we randomly select a USU undergraduate student. Let X= year in college, then P(X=1)=0.17, P(X=2)=0.21, P(X=3)=0.22. What is P(X=4)? P(X=5)?. Construct the pmf for X=year in college in tabular and graph forms. Suppose we randomly select a USU student and want to know the probability he/she is a freshman or a sophomore. If X=year in college, we can express the probability as P(X 2). A function of the form F(x)= P(X x), is called the cumulative distribution function (cdf) of the random variable X. Random Variables 11

The Distribution of A Discrete R.V. The cdf for X=year in college. x F(x) - <x<1 0 1 x<2.17 2 x<3.38 3 x<4.6 4 x< 1 Random Variables 12

The Distribution of A Discrete R.V. The pmfand cdffor X=year in college. Random Variables 13

The Distribution of A Discrete R.V. ~ Find the CDF (in tabular and graphical forms) for X = the amount we win (or lose) in one $1 bet on a number in Roulette. ~ A game is played in which a fair die is tossed. If the roll is even, the player earns a dollar amount corresponding to the die roll, otherwise, he pays that amount. Calculate the probability mass function and the cumulative distribution function of the player s net earnings. Random Variables 14

Expectation and Variance of a Discrete R.V. The expected value (also expectation or mean), μ, of a random variable can be thought of as a weighted average and is defined as follows: For a discrete random variable, with pmf P(X=x i )=p i, the expected value E(X)=Σ i p i x i. The expected value for X = Net winnings in one $1 bet on a number in Roulette is -1(37/38)+35(1/38) = -1/19-0.05. This means that if we bet $1 on a number in roulette many times, we can expect to lose about $0.05 per play. Random Variables 15

Expectation and Variance of a Discrete R.V. Obviously, we won t win -$0.05 on every play, rather we will win - $1 or $35, the variance tells us about the spread of the values of the random variable. The variance (denoted Var(X) or σ 2 ) of a random variable X measures the variability in the values taken on by the random variable. It is defined to be Var(X)=E((X-E(X)) 2 ). This can also be expressed as Var(X)=E(X 2 )-(E(X)) 2. The standard deviation of a random variable X is the positive square root of the variance and is therefore denoted by σ. Example 1: Find the variance of X = Net winnings in one $1 bet on a number in Roulette Example 2: Find the expected value and standard deviation of X=year in college. Random Variables 16

The Distribution of A Continuous R.V. What problems might we encounter in attempting to identify a probability mass function for a continuous random variable? A continuous random variable can be described by a probability density function f(x). f(x) 0 and S f(x)dx=1. The graphs below are of probability density functions of continuous random variables. Random Variables 17

The Distribution of A Continuous R.V. We can use the probability density function to find the probability that X lies in an interval, i.e. P(a<x<b). The probability density function of a continuous random variable is also called its distribution. The area under the curve over a given interval gives the probability that the random variable takes on a value in that region. Note that P(X=x)=f(x)=0 for all values of x. Random Variables 18

The Distribution of A Continuous R.V. For pdf f(x), we can compute the probability over b an interval as P ( a x b) = f ( x) dx This has two possible interpretations: 1. The probability that an individual randomly selected from the underlying population will have a value of X that falls between a and b. 2. The proportion of individuals in the underlying population that have a value of X between a and b. a Random Variables 19

The Distribution of A Continuous R.V. Example (Insect 1): The lifetime in months, X, of a particular insect has the probability distribution shown at the right and given by f 1 x 2 ( x) = e, x 2 Verify that this is a legitimate probability density function. 0 Random Variables 20

The Distribution of A Continuous R.V. 1. On the plot, diagram the area that represents the probability that a given insect lives no longer than 6 months. 2. Diagram the area that represents the proportion who live between 2 and 8 months. 3. Compute the probabilities that you diagrammed Random Variables 21

The Distribution of A Continuous R.V. Example (Insect 2): Suppose a second type of insect is know to live no longer than 4 months. The probability density function associated with the lifetime Y of this insect is given below: A y 2 f ( y) = e,0 y 4 2 ~ What must A be in order for this to be a valid pdf? The definition of the cumulative distribution function for a continuous random variable is the same as for a discrete random variable: F(x)= P(X x). Random Variables 22

The Distribution of A Continuous R.V. Percentiles, quantiles, and quartiles provide information about the spread of a random variable. For and random variable with cdf F(x), the pth quantile is the value of x for which F(x)=p. This is also referred to as the px100th percentile. The lower and upper quartiles refer to the.25, and.75 quantiles or the 25 th and 75 th percentiles. For a random variable X with CDF F(X), the median is the value of X for which F(x)=0.5. The interquartile range (IQR) is the distance between the lower and upper quartiles. That is if x 1 is the lower quartile and x 2 is the upper quartile, IQR=x 2 -x 1. Random Variables 23

The Distribution of A Continuous R.V. 1. Find and plot the cumulative distribution function for lifetime of insect 1. 2. Use the cdf to compute the probabilities that you diagrammed on the plot of the pdf. 3. What is the median lifetime? 4. What is the 75th percentile of lifetime? Random Variables 24

Expectation and Variance Suppose we d like to know the average lifetime for an insect of the first type (insect 1). As with discrete random variable, the expected value, μ, of a continuous random variable can be thought of as a weighted average. For a continuous random variable with probability density function f(x), the expected value E(X)= S xf(x)dx. The variance of a continous random variable X is defined in the same way as for a discrete random variable, that is, Var(X)=E((X-E(X)) 2 ) or Var(X)=E(X 2 )-(E(X)) 2. ~ Find the expected value and variance of X as defined for insect 1. Random Variables 25

Expectation and Variance The top figure at the right shows the distributions of two random variables with equal variances but different means (expected values). The bottom figure shows the distributions of two random variables with equal means, but different variances. Random Variables 26

Combinations and Functions of R.V.s Suppose we want to play roulette for bigger stakes, specifically we want to bet $100 on a number instead of $1. We can define a new random variable Y= the amount we win in one $100 bet on a number in roulette or Y=100X. Then we can use what we know about X to find a new expectation and variance. Suppose, instead, we want to keep the stakes the same, but we want to place three $1 bets instead of just one. Again we can define a new random variable Z= the amount we win in three $1 bets on a number in roulette or Z=X+X+X. Random Variables 27

Combinations and Functions of R.V.s Let X be a random variable such that E(X)=μ and Var(X)=σ 2. Suppose we re interested in a random variable Y defined as Y = a + bx, where a and b are constants. In other words, Y is a linear function of X. Then E(Y)=E(a+bX)=E(a)+bE(X)=a+bμ, and Var(Y)=Var(a+bX)=Var(a)+b 2 Var(X)=0+b 2 σ 2 =b 2 σ 2. Random Variables 28

Combinations and Functions of R.V.s Example: The random variables X, Y, and Z are independent with E(X)=1, Var(X)=3, E(Y)=2, Var(Y)=6, E(Z)=3, Var(Z)=4. Calculate the expected values and variances of the following random variables: 1. 2Z 2. Y-6 3. 3X + Y - 5Z - 7 Example: The length X of rainbow trout in a particular fishing hole, has expected value 35 cm with a variance of 10 cm. To translate to inches, let Y=.39(X). What are the expected value and variance of rainbow trout length in inches? Random Variables 29

Combinations and Functions of R.V.s Let X 1 and X 2 be independent random variables such that E(X 1 )=μ 1 and Var(X 1 )=σ 12, and E(X 2 )=μ 2 and Var(X 2 )=σ 22. Let Y be a linear combination of X 1 and X 2, Y=c 1 X 1 +c 2 X 2, where c 1 and c 2 are constants. Then E(Y)=E(c 1 X 1 + c 2 X 2 )=c 1 E(X 1 )+c 2 E(X 2 )=c 1 μ 1 +c 2 μ 2, and Var(Y)=Var(c 1 X 1 + c 2 X 2 )= c 12 Var(X 1 )+c 22 Var(X 2 )=c 12 σ 12 +c 22 σ 22. The expectation of Y given above holds regardless of the dependence of X 1 and X 2. However, the variance formula holds only if X 1 and X 2 are independent. Random Variables 30

Combinations and Functions of R.V.s Example 1: The random variables X, Y, and Z are independent with E(X)=1, Var(X)=3, E(Y)=2, Var(Y)=6, E(Z)=3, Var(Z)=4. Calculate the expected values and variances of the following random variables: 1. 3X-2Y 2. 5X+2Y+Z-12 Example 2: Recall the insect 1 lifetime example. Suppose that we randomly sample 10 insects of this type and record the length of time they live. What is the expected combined lifetime of these 10 insects in months? in weeks (assume 4 weeks/month)? in years? What is the standard deviation of their combined lifetime in months? in weeks? in years? Random Variables 31

Combinations and Functions of R.V.s If X 1, X n is a sequence of independent random variables each with expectation μ and variance σ 2. The average of these random variables is X = X 1 +... + n X n What are the expected value and variance of? X Random Variables 32

Combinations and Functions of R.V.s Example: Consider again the insect1 example. Suppose that we randomly select 20 insects and compute the average lifetime. ~ What is the expected value of the average? ~ What is the variance of the average? ~ By what factor do we need to increase our sample size to divide the standard deviation of the average in half? Random Variables 33

Combinations and Functions of R.V.s There are not general rules to relate expectations and variances of a random variable X to a nonlinear function Y of that random e.g. Y=X 2, Y=e x. In this case, we can construct the cumulative distribution function of Y from that of X. Consider the random variables X and Y such that f x (x)=x for 0 x 1 and Y=X 1/2. F x (x)=(1/2)x 2 F y (Y)=P(Y y)=p(x 1/2 y)=p(x y 2 )= F x (y 2 )=(1/2)(y 2 ) 2 =(1/2)(y 4 ) Therefore f y (y)=2y 3. Random Variables 34

Combinations and Functions of R.V.s Example: Suppose that the random variable X has probability density f x (x)=1 for 2 x 4. Find the probability density function of the random variable Y in the following cases: 1. Y=1/X 2. Y=3 x 3. Y=X 2 Random Variables 35