STOR Lecture 7. Random Variables - I

Similar documents
Binomial Random Variables. Binomial Random Variables

Chapter 3 - Lecture 5 The Binomial Probability Distribution

Probability Theory. Mohamed I. Riffi. Islamic University of Gaza

Random Variables Handout. Xavier Vilà

5. In fact, any function of a random variable is also a random variable

15.063: Communicating with Data Summer Recitation 3 Probability II

Probability Distributions for Discrete RV

Chapter 3 - Lecture 3 Expected Values of Discrete Random Va

Discrete Random Variables

MA : Introductory Probability

Random variables. Discrete random variables. Continuous random variables.

STOR 155 Introductory Statistics (Chap 5) Lecture 14: Sampling Distributions for Counts and Proportions

Discrete Random Variables and Probability Distributions. Stat 4570/5570 Based on Devore s book (Ed 8)

Mean of a Discrete Random variable. Suppose that X is a discrete random variable whose distribution is : :

Probability mass function; cumulative distribution function

Chapter 16. Random Variables. Copyright 2010 Pearson Education, Inc.

4 Random Variables and Distributions

STA258H5. Al Nosedal and Alison Weir. Winter Al Nosedal and Alison Weir STA258H5 Winter / 41

Expectations. Definition Let X be a discrete rv with set of possible values D and pmf p(x). The expected value or mean value of X, denoted by E(X ) or

STA Module 3B Discrete Random Variables

Chapter 16. Random Variables. Copyright 2010, 2007, 2004 Pearson Education, Inc.

STA Rev. F Learning Objectives. What is a Random Variable? Module 5 Discrete Random Variables

Chapter 3 - Lecture 4 Moments and Moment Generating Funct

The Binomial Distribution

4.2 Bernoulli Trials and Binomial Distributions

Welcome to Stat 410!

Chapter 3 Discrete Random Variables and Probability Distributions

CS 237: Probability in Computing

6 If and then. (a) 0.6 (b) 0.9 (c) 2 (d) Which of these numbers can be a value of probability distribution of a discrete random variable

9 Expectation and Variance

Binomial and multinomial distribution

Examples: Random Variables. Discrete and Continuous Random Variables. Probability Distributions

CS134: Networks Spring Random Variables and Independence. 1.2 Probability Distribution Function (PDF) Number of heads Probability 2 0.

Lecture 9: Plinko Probabilities, Part III Random Variables, Expected Values and Variances

Probability Theory and Simulation Methods. April 9th, Lecture 20: Special distributions

UQ, STAT2201, 2017, Lectures 3 and 4 Unit 3 Probability Distributions.

6. Continous Distributions

Review of the Topics for Midterm I

5.4 Normal Approximation of the Binomial Distribution

AP Statistics Ch 8 The Binomial and Geometric Distributions

Statistical Methods in Practice STAT/MATH 3379

MATH 264 Problem Homework I

Experimental Probability - probability measured by performing an experiment for a number of n trials and recording the number of outcomes

STAT Chapter 4/6: Random Variables and Probability Distributions

Random Variables and Probability Functions

Problems from 9th edition of Probability and Statistical Inference by Hogg, Tanis and Zimmerman:

STAT Mathematical Statistics

Bernoulli and Binomial Distributions

M3S1 - Binomial Distribution

Lecture 23. STAT 225 Introduction to Probability Models April 4, Whitney Huang Purdue University. Normal approximation to Binomial

CS145: Probability & Computing

Probability Distributions

Engineering Statistics ECIV 2305

Chapter 7. Sampling Distributions and the Central Limit Theorem

Shifting our focus. We were studying statistics (data, displays, sampling...) The next few lectures focus on probability (randomness) Why?

The Binomial Probability Distribution

TRINITY COLLGE DUBLIN

Part 10: The Binomial Distribution

Chapter 4 Discrete Random variables

Part 1 In which we meet the law of averages. The Law of Averages. The Expected Value & The Standard Error. Where Are We Going?

Chapter 7. Sampling Distributions and the Central Limit Theorem

1 PMF and CDF Random Variable PMF and CDF... 4

A random variable (r. v.) is a variable whose value is a numerical outcome of a random phenomenon.

Econ 6900: Statistical Problems. Instructor: Yogesh Uppal

guessing Bluman, Chapter 5 2

Binomal and Geometric Distributions

Probability and Statistics

Binomial Distributions

Chapter 2. Random variables. 2.3 Expectation

Discrete Random Variables and Probability Distributions

Version A. Problem 1. Let X be the continuous random variable defined by the following pdf: 1 x/2 when 0 x 2, f(x) = 0 otherwise.

Simple Random Sample

Math 14 Lecture Notes Ch. 4.3

Statistics for Business and Economics

Review for Final Exam Spring 2014 Jeremy Orloff and Jonathan Bloom

Normal Distribution. Notes. Normal Distribution. Standard Normal. Sums of Normal Random Variables. Normal. approximation of Binomial.

Chapter 4 Discrete Random variables

ECON 214 Elements of Statistics for Economists 2016/2017

Discrete Random Variables

Statistical Methods for NLP LT 2202

MA 1125 Lecture 14 - Expected Values. Wednesday, October 4, Objectives: Introduce expected values.

Chapter 6: Random Variables. Ch. 6-3: Binomial and Geometric Random Variables

CHAPTER 6 Random Variables

Test 7A AP Statistics Name: Directions: Work on these sheets.

Statistics for Managers Using Microsoft Excel 7 th Edition

6.3: The Binomial Model

Chapter 5. Sampling Distributions

Statistics 6 th Edition

Binomial Distribution and Discrete Random Variables

Chapter 5. Statistical inference for Parametric Models

Central Limit Theorem, Joint Distributions Spring 2018

18.05 Problem Set 3, Spring 2014 Solutions

Consider the following examples: ex: let X = tossing a coin three times and counting the number of heads

What do you think "Binomial" involves?

The binomial distribution

MA 1125 Lecture 12 - Mean and Standard Deviation for the Binomial Distribution. Objectives: Mean and standard deviation for the binomial distribution.

CIVL Discrete Distributions

VIDEO 1. A random variable is a quantity whose value depends on chance, for example, the outcome when a die is rolled.

The Binomial distribution

The binomial distribution p314

Transcription:

STOR 435.001 Lecture 7 Random Variables - I Shankar Bhamidi UNC Chapel Hill 1 / 31

Example 1a: Suppose that our experiment consists of tossing 3 fair coins. Let Y denote the number of heads that appear. So: Example 1b: Three balls are to be randomly selected without replacement from an urn containing 20 balls numbered 1 through 20. Let X be the largest ball selected. So: Definition A random variable is a real-valued function defined on the sample space. Think of this as a measurement of some property of a random experiment. Typical notation: X, Y, Z, etc. 2 / 31

Intuition/Rationale behind random variables Might have a super complicated sample space (e.g. state of the universe next Monday at 9:00 a.m. Our brain too tiny to comprehend all the probabilities associated with this complicated space. However we could be interested in a small aspect ( measurement ) of this sample space: e.g. price of Netflix stock next Monday at 9:00 a.m. This measurement is our random variable.) 3 / 31

Characterizing a random variable: indicate what values it takes and with what probabilities. 1 Example 1a: Suppose that our experiment consists of tossing 3 fair coins. Let Y denote the number of heads that appear. Example 1b: Three balls are to be randomly selected without replacement from an urn containing 20 balls numbered 1 through 20. Let X be the largest ball selected. 1 Note that the values of a random variable can be regarded as outcomes in a new probability space, with probabilities assigned. 4 / 31

Types of random variables Two main types of random variables Discrete [mainly in Chapter 3] and Continuous [mainly in Chapter 5]. Treatment and analysis differ slightly. 1. For discrete, use counting arguments/summations etc. 2. For continuous, use Calculus etc. Probability mass function (p.m.f.) [Characterizing a random variable 1] p(a) = P (X = a), a (, ) Discrete random variables X assumes one of its values x 1, x 2,...: p(x i ) 0, i = 1, 2,..., p(x) = 0 for other x. Note: p.m.f. characterizes discrete X. Moreover: i=1 p(x i) = 1. Graphically: 5 / 31

Characterizing a random variable 2: Through the cumulative distribution function (c.d.f.): F (x) = P (X x), < x <. 6 / 31

Random Variables Question: Why called random variables? Discrete random variable: takes at most a countable number of possible values. Note: the random variables in Examples 1a, 1b are discrete. 7 / 31

Example 1a: Suppose that our experiment consists of tossing 3 fair coins. Let Y denote the number of heads that appear. What are p.m.f. and d.f. of Y? 8 / 31

Example: You are told that the cdf of a random variable X is given by 0 for x <.5 F X (x) = 1 4 for.5 x < 1 3 8 for 1 x < 1.75 1 2 for 1.75 x < 3 1 for 3 x <. 1. Draw this function. 2. Find the values this random variable takes and the corresponding probabilities. 9 / 31

Solution: Drawing the function 10 / 31

Solution: Finding the values the function takes 11 / 31

Definition If X is a discrete random variable taking values x i with probability p(x i ), its expected value (or mean) is defined as EX = i x i p(x i ). Motivation: EX = long run average of values of X in n repeated experiments 1 n = lim X (i) n n = lim n = k k i=1 x k number of x k in n repeated experiments n x k p(x k ). 12 / 31

Example 3a: Find EX, where X is the outcome when we roll a fair six-faced die. Note: 3.5 is not one of the values the dice can take. So don t get confused with expected value. Example 3b: We say that I is an indicator variable for the event A if I = { 1 if A occurs, 0 if A c occurs. Find EI. 13 / 31

Example If Y denotes the outcome of an unfair 6-faced die where P(Y = 1) = 1/3, P(Y = 2) = 1/9, P(Y = 3) = 1/18 P(Y = 4) = 1/18, P(Y = 5) = 1/9, P(Y = 6) = 1/3 Calculate E(Y ). 14 / 31

If X is a discrete random variable and g is a function, then g(x) is also a discrete random variable. If one wanted to compute the expected value of g(x), one could do this by definition after finding the values it takes and the probabilities. Example: Suppose X takes values 1, 0 and 1 with probabilities 0.2, 0.5 and 0.3. Let Y = X 2. Then, EY is: Note also that: 15 / 31

Computing expectation of function of random variable If X is a discrete random variable taking values x i with probability p(x i ), and g is a function, then Eg(X) = g(x i )p(x i ). i Terminology: EX = mean, 1st moment; EX n = nth moment, n 1. Simple consequence: for two constants a, b, E(aX + b) = i (ax i + b)p(x i ) = a i x i p(x i ) + b i p(x i ) = aex + b. 16 / 31

Newspaper vendor problem A salesman sees that a new smartphone, the JPhone 6X is about to be released and wonders if he should buy a few and sell them. He can buy these phones at $100 and sell it to customers who are willing to pay $150. However the demand is variable. Let X be the demand for the phone from this salesman then this is a random variable with distribution P(X = k) := ( 10 k ) ( 1 3 ) k ( 2 3 ) 10 k, k = 0, 1, 2,..., 10 Approximately how many phones should he purchase so as to maximize his expected profit? 17 / 31

18 / 31

Mean EX is a measure of center of p.m.f. It says nothing about variation or spread of the values. For example W = 0, Y = ±1 with probability 1/2, and Z = ±100 with probability 1/2, have all mean zero EW = EY = EZ = 0 but very different spreads. Definition If X is a random variable with mean µ, its variance is defined as Var(X) = E(X µ) 2. Var(X) is called the standard deviation of X. 19 / 31

Note 1: Var(X) = E(X 2 ) (EX) 2. Example: X is the outcome when a fair die is rolled. Note 2: for two numbers a, b, Var(aX + b) = a 2 Var(X). 20 / 31

Moment generating function Given a random variable X, the moment generating function (MGF) of the random variable is defined as the function M X (t) := E(e tx ), t R. Why super important Small note In some cases might be hard to get explicit formula for the MGF. 21 / 31

Binomial Random variables Bernoulli experiment: 2 possible outcomes: success (with probability p) and failure (with probability 1 p) Bernoulli random variable X: takes 2 values: 1 (success) with probability p and 0 (failure) with probability 1 p. Example: tossing a fair coin; H = success, T = failure; p = 1/2. Binomial random variable X: the number of successes in n independent Bernoulli trials: ( ) n P (X = i) = p i (1 p) n i, i = 0, 1,..., n. i Notation: X = B(n, p). Bernoulli: X = B(1, p). Example: tossing a fair coin n times; X = number of H s = B(n, 1/2). 22 / 31

Binomial random variables Where does the Binomial pmf come from? Let us do an example: Suppose you do 3 Bernoulli trials. Probability of success (S) is 1/4. Let X = number of successes out of 3. What is 1. P (X = 0)? 2. P (X = 1)? 3. P (X = 2)? 23 / 31

Calculations continued 24 / 31

Some properties: If X = B(n, p), what is the moment generating function of X? 25 / 31

Binomial random variables Examples of the MGF for two different Binomial distributions. 26 / 31

Binomial Random variables Some properties: If X = B(n, p), then EX = np: Note: Book calculates this without using MGF, just using properties of combinations ( ) n k Similarly, EX 2 = (np) 2 + np(1 p) and hence Var(X) = np(1 p). 27 / 31

Calculating moments of Binomial without MGF Calculating E(X) for Binomial 28 / 31

Calculating moments of Binomial without MGF Calculating E(X 2 ) for Binomial 29 / 31

Binomial Random variables Problem: A big supermarket chain Motco sells big boxes of nuts. Each box of nuts actually had 10 small ready to take to work pre-packed packets of nuts. It is known that each packet will have one or more raisins with probability.05, independently of any other packet (or any other box). The company offers a money-back guarantee that at most 1 of the 10 packets in the package will have raisins. The guarantee is that the customer can return the entire box if he or she finds more than one packet with raisins in them. Shankar, being addicted to nuts, buys 5 boxes. What is the probability that he will return exactly 1 of these 5 boxes? 30 / 31

Solution continued 31 / 31