Continuous Variables Chris Piech CS109, Stanford University

Size: px
Start display at page:

Download "Continuous Variables Chris Piech CS109, Stanford University"

Transcription

1 Continuous Variables Chris Piech CS109, Stanford University

2 1906 Earthquak Magnitude 7.8

3 Learning Goals 1. Comfort using new discrete random variables 2. Integrate a density function (PDF) to get a probability 3. Use a cumulative function (CDF) to get a probability

4 Discrete Distributions Don t have to derive all of the following distributions. We want you to get a sense of how random variables work.

5 Grid of Random Variables One trial number of successes X Ber( p) time to get successes X Geo( p) One success n = 1 r = 1 Several trials X Bin(n, p) X NegBin(r, p) Several successes Interval of time X Poi(λ ) X Ep(λ ) One success

6 Geometric Random Variable X is Geometric Random Variable: X ~ Geo(p) X is number of independent trials until first success p is probability of success on each trial X takes on values 1, 2, 3,, with probability: n-1 P( X = n) = (1 - p) p E[X] = 1/p Var(X) = (1 p)/p 2

7 Negative Binomial Random Variable X is Negative Binomial RV: X ~ NegBin(r, p) X is number of independent trials until r successes p is probability of success on each trial X takes on values r, r + 1, r + 2, with probability: æn -1ö r n-r P( X = n) = ç p (1 - p), where n = r, r + 1,... è r -1ø E[X] = r/p Var(X) = r(1 p)/p 2 Note: Geo(p) ~ NegBin(1, p)

8 Bernoulli: indicator of coin flip X ~ Ber(p) Binomial: # successes in n coin flips X ~ Bin(n, p) Poisson: # successes in n coin flips X ~ Poi(l) Geometric: # coin flips until success X ~ Geo(p) Negative Binomial: Zipf: Discrete Distributions # trials until r successes X ~ NegBin(r, p) The popularity rank of a random word, from a natural language X ~ Zipf(s)

9 Bit Coin Mining Data Salt SHA-256 Hash(, ) Fied Choice Number that looks like random bits You mine a bitcoin if, for given data D, you find a number N such that Hash(D, N) produces a string that starts with g zeroes.

10 Midterm Question: Bit Coin Mining You mine a bitcoin if, for given data D, you find a number N such that Hash(D, N) produces a string that starts with g zeroes. (a) What is the probability that the first number you try will produce a bit string which starts with g zeroes (in other words you mine a bitcoin)? (b) How many different numbers do you epect to have to try before you mine five bitcoins?

11 Dating at Stanford Each person you date has a 0.2 probability of being someone you spend your life with. What is the average number of people one will date? What is the standard deviation?

12 Equity in the Courts Berghuis v. Smith If a group is underrepresented in a jury pool, how do you tell? Article by Erin Miller January 22, 2010 Thanks to (former CS109er) Josh Falk for this article Justice Breyer [Stanford Alum] opened the questioning by invoking the binomial theorem. He hypothesized a scenario involving an urn with a thousand balls, and sity are blue, and nine hundred forty are purple, and then you select them at random twelve at a time. According to Justice Breyer and the binomial theorem, if the purple balls were under represented jurors then you would epect something like a third to a half of juries would have at least one minority person on them.

13 Justin Breyer Meets CS109 Approimation using Binomial distribution Assume P(blue ball) constant for every draw = 60/1000 X = # blue balls drawn. X ~ Bin(12, 60/1000 = 0.06) P(X 1) = 1 P(X = 0)» = In Breyer s description, should actually epect just over half of juries to have at least one non-white person on them P(X = ) Demo # Minority Jurrors

14 Four Prototypical Trajectories Big hole in our knowledge

15 Not all values are discrete

16 Four Prototypical Trajectories random()?

17 Riding the Marguerite

18 Riding the Marguerite You are running to the bus stop. You don t know eactly when the bus arrives. You have a distribution of probabilities. You show up at 2:20pm. What is P(wait < 5 minutes)? What is the probability that the bus arrives at: 2:17pm and seconds?

19 Riding the Marguerite You are running to the bus stop. You don t know eactly when the bus arrives. You have a distribution of probabilities. You show up at 2:15pm. What is P(wait < 5 minutes)? wait <5 min P(T = t) 2:00pm Bus arrives (t) mins after 2:00pm

20 Riding the Marguerite You are running to the bus stop. You don t know eactly when the bus arrives. You have a distribution of probabilities. You show up at 2:15pm. What is P(wait < 5 minutes)? P(T = t) wait <5 min P(15 < T 20) image: Haha169 2:00pm Bus arrives (t) mins after 2:00pm

21 Riding the Marguerite You are running to the bus stop. You don t know eactly when the bus arrives. You have a distribution of probabilities. You show up at 2:15pm. What is P(wait < 5 minutes)? P(T = t) wait <5 min P(15 < X 17.5) + P(17.5 < X 20) image: Haha169 2:00pm Bus arrives (t) mins after 2:00pm

22 Riding the Marguerite You are running to the bus stop. You don t know eactly when the bus arrives. You have a distribution of probabilities. You show up at 2:15pm. What is P(wait < 5 minutes)? Probability Density Function f T (t) wait <5 min P(15 < T 20) image: Haha169 2:00pm Bus arrives (t) mins after 2:00pm

23 Probability Density Function The probability density function (PDF) of a continuous random variable represents the relative likelihood of various values. Units of probability divided by units of X. Integrate it to get probabilities! P (a <X<b)= Z b f X () d =a

24 Integrals *loving, not scary

25 Properties of PDFs 0 apple Z b =a f X () d apple 1 Z 1 f X () d =1 1

26 What do you get if you integrate over a probability density function? A probability!

27 Probability Density Function Probability density functions articulate relative belief. Let X be a random variable which is the # of minutes after 2pm that the bus arrives at the stop: A C B Which of these represent that you think the arrival is more likely to be close to 3:00pm 0 60

28 Piech, CS106A, Stanford University The ratio of probability densities is meaningful

29 f() is Not a Probability Rather, it has units of: probability divided by units of X. 2 min f() 0.05 prob/min 2:00pm 2:20pm 2:30pm = 0.1 prob

30 f() is Not a Probability Note: f() can be greater than 1! f() 2.0 prob/min 2:00pm 0.5 min 2:20pm 2:30pm = 1.0 prob

31 Simple Eample Consider a random matri, where each element in the matri is Uniform(0,1). What is the probability that a selected eigenvalue (λ) of the matri is greater than 0?* * With help from Wigner, Chris is going to rephrase this problem

32 Simple Eample from Quantum Physics Let X be a continuous random variable: Theory f() = 1 p f() p() Practice From simulations P (X >0) =?

33 Simple Eample from Quantum Physics Let X be a continuous random variable: Theory f() = 1 p f() p() Practice From simulations Approach #1: Integrate over the PDF P (X >0) = Z f X () d

34 Simple Eample from Quantum Physics Let X be a continuous random variable: Theory f() = 1 p f() p() Practice From simulations Approach #2: Discrete Approimation 100 P (X >0) X P (X = i) ii=0

35 Simple Eample from Quantum Physics Let X be a continuous random variable: Theory f() = 1 p f() p() Practice From simulations Approach #3: Know Semi-Circles P (X >0) = 1 2

36 What do you get if you integrate over a probability density function? A probability!

37 Uniform Random Variable A uniform random variable is equally likely to be any value in an interval. X Uni(α,β) Probability Density Properties f ( ) = ì ï í ïî 1 b -a 0 a b otherwise E[X] = 2 f() Var(X) = ( )2 12 β

38 Uniform Bus You are running to the bus stop. You don t know eactly when the bus arrives. You believe all times between 2 and 2:30 are equally likely. You show up at 2:15pm. What is P(wait < 5 minutes)? f T (t) wait <5 min T Uni( =0, = 30) P (Wait < 5) = Z = 1 d 20 2:00pm Bus arrives (t) mins after 2:00pm = = 5 30

39 Epectation and Variance For discrete RV X: For continuous RV X: For both discrete and continuous RVs:

40 Epectation of Uniform Z E[X] = Z = Z 1 1 X Uni(, ) f() d 1 d Z i = 1 h 1 2 2i just average the start and end! = 1 2 ( + ) h i = ( + )( )

41 Eponential Random Variable X is an Eponential RV: X ~ Ep(l) Rate: l > 0 Probability Density Function (PDF): -l ìle f ( ) = í î 0 1 E[ X ] = l 1 Var( X ) = Represents time until some event o 2 l if ³ 0 where - < < if < 0 f () Earthquake, request to web server, end cell phone contract, etc.

42 1906 Earthquak Magnitude 7.8

43 How Many Earthquakes Based on historical data, major earthquakes (magnitude 8.0+) happen at a rate of per year*. What is the probability of zero major earthquakes magnitude net year? X = Number of major earthquakes net year *In California, according to the USGS, 2015

44 How Long Until Net Earthquake Based on historical data, major earthquakes (magnitude 8.0+) happen at a rate of per year*. What is the probability of an earthquake of magnitude 8+ in the net 30 years? Y = Years until the net earthquake of magnitude 8.0+ Y Ep( =0.002) f Y (y) = e P (Y < 30) = Z e 0.002y dy y = y 0 h i 30 *In California, according to the USGS, 2015

45 Integral Review Z e c d = 1 c ec

46 How Long Until Net Earthquake Based on historical data, major earthquakes (magnitude 8.0+) happen at a rate of per year*. What is the probability of an earthquake of magnitude 8+ in the net 30 years? Y = Years until the net earthquake of magnitude 8.0+ Y Ep( =0.002) f Y (y) = e P (Y < 30) = Z Z e 0.002y dy h = e 0.002yi i30 = ( e e 0 ) y = y *In California, according to the USGS, 2015

47 Four Prototypical Trajectories Is there a way to avoid integrals?

48 Cumulative Density Function A cumulative density function (CDF) is a closed form equation for the probability that a random variable is less than a given value F () =P (X <)= If you learn how to use a cumulative density function, you can avoid integrals! F X () This is also shorthand notation for the PMF

49 Cumulative Density Function F () =P (X <)= =

50 CDF of an Eponential F X () =1 e P (X <)= Z f(y) dy y= 1 Z = e y dy = y=0 h =[ e =1 e e y i 0 ] [ e 0 ]

51 CDF: X ~ Ep(l = 1) Probability density function f() = e Cumulative density function F () =1 e F X () =P (X <) Z = f(y) dy y= 1

52 CDF: X ~ Ep(l = 1) Probability density function f() = e P(X < 2) Cumulative density function F () =1 e F X () =P (X <) Z = f(y) dy y= 1

53 CDF: X ~ Ep(l = 1) Probability density function f() f() = e P(X < 2) Z 2 = f() d = 1 Cumulative density function F () =1 e F X () =P (X <) Z = f(y) dy y= 1

54 CDF: X ~ Ep(l = 1) Probability density function f() f() = e P(X < 2) Z 2 = f() d = 1 Cumulative density function F () =1 e = F (2) or F X () =P (X <) Z = f(y) dy y= 1 =1 e

55 CDF: X ~ Ep(l = 1) Probability density function f() = e P(X > 1) Cumulative density function F () =1 e F X () =P (X <) Z = f(y) dy y= 1

56 CDF: X ~ Ep(l = 1) Probability density function f() = e = P(X > 1) Z 1 f() d =1 Cumulative density function F () =1 e F X () =P (X <) Z = f(y) dy y= 1

57 CDF: X ~ Ep(l = 1) Probability density function f() = e = P(X > 1) Z 1 f() d =1 Cumulative density function F () =1 e or =1 F (1) F X () =P (X <) Z = f(y) dy y= 1 = e

58 CDF: X ~ Ep(l = 1) Probability density function f() = e P(1 < X < 2) Cumulative density function F () =1 e F X () =P (X <) Z = f(y) dy y= 1

59 CDF: X ~ Ep(l = 1) Probability density function f() = e P(1 < X < 2) Z 2 = f() d =1 Cumulative density function F () =1 e F X () =P (X <) Z = f(y) dy y= 1

60 CDF: X ~ Ep(l = 1) Probability density function f() f() = e P(1 < X < 2) Z 2 = f() d =1 Cumulative density function F () =1 e or = F (2) F (1) F X () =P (X <) Z = f(y) dy y= 1 =(1 e 2 ) 0.23 (1 e 1 )

61 Probability of Earthquake in Net 4 Years? Based on historical data, earthquakes of magnitude 8.0+ happen at a rate of per year*. What is the probability of an earthquake of magnitude 8+ in the net 4 years? Y = Years until the net earthquake of magnitude 8.0+ Y Ep( =0.002) F (y) =1 e 0.002y P (Y < 4) = F (4) =1 e Feeling lucky? *According to USGS, 2015

62 Properties for Continuous Random Variables Semantic Meaning f X () F() Continuous Random Variable E[X] Var(X) E[X 2 ] Std(X)

63 Four Prototypical Trajectories Etra Problems

64 Visits to a Website Say visitor to your web site leaves after X minutes On average, visitors leave site after 5 minutes Assume length of stay is Eponentially distributed X ~ Ep(l = 1/5), since E[X] = 1/l = 5 What is P(X > 10)? P( X > 10) = 1- F(10) = 1- (1 - e -l10 ) = e -2» What is P(10 < X < 20)? P(10 < X < 20) = F(20) - F(10) = (1 - e -4 ) - (1 - e -2 )»

65 Replacing Your Laptop X = # hours of use until your laptop dies P( X On average, laptops die after 5000 hours of use X ~ Ep(l = 1/5000), since E[X] = 1/l = 5000 You use your laptop 5 hours/day. What is P(your laptop lasts 4 years)? That is: P(X > (5)(365)(4) = 7300) > 7300) = 1- F(7300) = 1- (1 - e -7300/ 5000 ) = e -1.46» Better plan ahead... especially if you are coterming: P( X > 9125) = 1- F(9125) = e » (5year plan) P( X > 10950) = 1- F(10950) = e -2.19» (6year plan)

66 X = time until some event occurs X ~ Ep(l) What is P(X > s + t X > s)? After initial period of time s, P(X > t ) for waiting another t units of time until event is same as at start Memoryless = no impact from preceding period s ) ( ) ( ) ( ) and ( ) ( s X P t s X P s X P s X t s X P s X t s X P > + > = > > + > = > + > ) ( ) ( 1 ) ( 1 ) ( 1 ) ( ) ( ) ( t X P t F e e e s F t s F s X P t s X P t s t s > = - = = = = > + > l l l ) ( ) ( So, t X P s X t s X P > = > + > Eponential is Memoryless

67 Disk Crashes X = days of use before your disk crashes 1= First, determine l to have actual PDF u u o Good integral to know: ò e du = e ò le -/100 d = -100l What is P(50 < X < 150)? F(150) - F(50) = What is P(X < 10)? F(10) = -/100 ì le ³ 0 f ( ) = í î 0 otherwise 150 ò ò 0 ò e e e -/100 -/100 -/100 d = -100le d = -e d = -e -/ / /100 = -e = -e 0-3/ 2-1/10 = 100l Þ + e -1/ 2 + 1» l =»

68 Zipf Random Variable X is Zipf RV: X ~ Zipf(s) X is the rank inde of a chosen word P (X = k) =C 1 k s

Poisson Chris Piech CS109, Stanford University. Piech, CS106A, Stanford University

Poisson Chris Piech CS109, Stanford University. Piech, CS106A, Stanford University Poisson Chris Piech CS109, Stanford University Piech, CS106A, Stanford University Probability for Extreme Weather? Piech, CS106A, Stanford University Four Prototypical Trajectories Review Binomial Random

More information

Debugging Intuition. How to calculate the probability of at least k successes in n trials?

Debugging Intuition. How to calculate the probability of at least k successes in n trials? How to calculate the probability of at least k successes in n trials? X is number of successes in n trials each with probability p # ways to choose slots for success Correct: Debugging Intuition P (X k)

More information

Binomial in the Limit

Binomial in the Limit Lisa Yan CS 09 Lecture Notes #8 July 3, 208 The Poisson Distribution and other Discrete Distributions Based on a chapter by Chris Piech Binomial in the Limit Recall the example of sending a bit string

More information

a zoo of (discrete) random variables

a zoo of (discrete) random variables a zoo of (discrete) random variables 42 uniform random variable Takes each possible value, say {1..n} with equal probability. Say random variable uniform on S Recall envelopes problem on homework... Randomization

More information

Lecture 08: Poisson and More. Lisa Yan July 13, 2018

Lecture 08: Poisson and More. Lisa Yan July 13, 2018 Lecture 08: Poisson and More Lisa Yan July 13, 2018 Announcements PS1: Grades out later today Solutions out after class today PS2 due today PS3 out today (due next Friday 7/20) 2 Midterm announcement Tuesday,

More information

The Random Variable for Probabilities Chris Piech CS109, Stanford University

The Random Variable for Probabilities Chris Piech CS109, Stanford University The Random Variable for Probabilities Chris Piech CS109, Stanford University Assignment Grades 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 Frequency Frequency 10 20 30 40 50 60 70 80

More information

Bernoulli and Binomial

Bernoulli and Binomial Bernoulli and Binomial Will Monroe July 1, 217 image: Antoine Taveneaux with materials by Mehran Sahami and Chris Piech Announcements: Problem Set 2 Due this Wednesday, 7/12, at 12:3pm (before class).

More information

More discrete distributions

More discrete distributions Will Monroe July 14, 217 with materials by Mehran Sahami and Chris Piech More discrete distributions Announcements: Problem Set 3 Posted yesterday on the course website. Due next Wednesday, 7/19, at 12:3pm

More information

Lecture 10: Normal RV. Lisa Yan July 18, 2018

Lecture 10: Normal RV. Lisa Yan July 18, 2018 Lecture 10: Normal RV Lisa Yan July 18, 2018 Announcements Midterm next Tuesday Practice midterm, solutions out on website SCPD students: fill out Google form by today Covers up to and including Friday

More information

a zoo of (discrete) random variables

a zoo of (discrete) random variables discrete uniform random variables A discrete random variable X equally liely to tae any (integer) value between integers a and b, inclusive, is uniform. Notation: X ~ Unif(a,b) a zoo of (discrete) random

More information

The Random Variable for Probabilities Chris Piech CS109, Stanford University

The Random Variable for Probabilities Chris Piech CS109, Stanford University The Random Variable for Probabilities Chris Piech CS109, Stanford University Assignment Grades 10 20 30 40 50 60 70 80 90 100 10 20 30 40 50 60 70 80 90 100 Frequency Frequency 10 20 30 40 50 60 70 80

More information

Class 26: review for final exam 18.05, Spring 2014

Class 26: review for final exam 18.05, Spring 2014 Probability Class 26: review for final eam 8.05, Spring 204 Counting Sets Inclusion-eclusion principle Rule of product (multiplication rule) Permutation and combinations Basics Outcome, sample space, event

More information

The Normal Distribution

The Normal Distribution The Normal Distribution image: Etsy Will Monroe July 19, 017 with materials by Mehran Sahami and Chris Piech Announcements: Midterm A week from yesterday: Tuesday, July 5, 7:00-9:00pm Building 30-105 One

More information

Independent random variables

Independent random variables Will Monroe July 4, 017 with materials by Mehran Sahami and Chris Piech Independent random variables Announcements: Midterm Tomorrow! Tuesday, July 5, 7:00-9:00pm Building 30-105 (main quad, Geology Corner)

More information

Relationship between probability set function and random variable - 2 -

Relationship between probability set function and random variable - 2 - 2.0 Random Variables A rat is selected at random from a cage and its sex is determined. The set of possible outcomes is female and male. Thus outcome space is S = {female, male} = {F, M}. If we let X be

More information

Things to remember when learning probability distributions:

Things to remember when learning probability distributions: SPECIAL DISTRIBUTIONS Some distributions are special because they are useful They include: Poisson, exponential, Normal (Gaussian), Gamma, geometric, negative binomial, Binomial and hypergeometric distributions

More information

Math/Stat 352 Lecture 8

Math/Stat 352 Lecture 8 Math/Stat 352 Lecture 8 Sections 4.3 and 4.4 Commonly Used Distributions: Poisson, hypergeometric, geometric, and negative binomial. 1 The Poisson Distribution Poisson random variable counts the number

More information

n px p x (1 p) n x. p x n(n 1)... (n x + 1) x!

n px p x (1 p) n x. p x n(n 1)... (n x + 1) x! Lectures 3-4 jacques@ucsd.edu 7. Classical discrete distributions D. The Poisson Distribution. If a coin with heads probability p is flipped independently n times, then the number of heads is Bin(n, p)

More information

Random variable X is a mapping that maps each outcome s in the sample space to a unique real number x, x. X s. Real Line

Random variable X is a mapping that maps each outcome s in the sample space to a unique real number x, x. X s. Real Line Random Variable Random variable is a mapping that maps each outcome s in the sample space to a unique real number,. s s : outcome Sample Space Real Line Eamples Toss a coin. Define the random variable

More information

Conditional distributions

Conditional distributions Conditional distributions Will Monroe July 6, 017 with materials by Mehran Sahami and Chris Piech Independence of discrete random variables Two random variables are independent if knowing the value of

More information

STAT 430/510 Probability Lecture 12: Central Limit Theorem and Exponential Distribution

STAT 430/510 Probability Lecture 12: Central Limit Theorem and Exponential Distribution STAT 430/510 Probability Lecture 12: Central Limit Theorem and Exponential Distribution Pengyuan (Penelope) Wang June 15, 2011 Review Discussed Uniform Distribution and Normal Distribution Normal Approximation

More information

STA 4321/5325 Solution to Extra Homework 1 February 8, 2017

STA 4321/5325 Solution to Extra Homework 1 February 8, 2017 STA 431/535 Solution to Etra Homework 1 February 8, 017 1. Show that for any RV X, V (X 0. (You can assume X to be discrete, but this result holds in general. Hence or otherwise show that E(X E (X. Solution.

More information

random variables T T T T H T H H

random variables T T T T H T H H random variables T T T T H T H H random variables A random variable X assigns a real number to each outcome in a probability space. Ex. Let H be the number of Heads when 20 coins are tossed Let T be the

More information

CSE 312, 2011 Winter, W.L.Ruzzo. 6. random variables

CSE 312, 2011 Winter, W.L.Ruzzo. 6. random variables CSE 312, 2011 Winter, W.L.Ruzzo 6. random variables random variables 23 numbered balls Ross 4.1 ex 1b 24 first head 25 probability mass functions 26 head count Let X be the number of heads observed in

More information

Lecture Notes 2 Random Variables. Discrete Random Variables: Probability mass function (pmf)

Lecture Notes 2 Random Variables. Discrete Random Variables: Probability mass function (pmf) Lecture Notes 2 Random Variables Definition Discrete Random Variables: Probability mass function (pmf) Continuous Random Variables: Probability density function (pdf) Mean and Variance Cumulative Distribution

More information

Lecture Notes 2 Random Variables. Random Variable

Lecture Notes 2 Random Variables. Random Variable Lecture Notes 2 Random Variables Definition Discrete Random Variables: Probability mass function (pmf) Continuous Random Variables: Probability density function (pdf) Mean and Variance Cumulative Distribution

More information

Random Variable And Probability Distribution. Is defined as a real valued function defined on the sample space S. We denote it as X, Y, Z,

Random Variable And Probability Distribution. Is defined as a real valued function defined on the sample space S. We denote it as X, Y, Z, Random Variable And Probability Distribution Introduction Random Variable ( r.v. ) Is defined as a real valued function defined on the sample space S. We denote it as X, Y, Z, T, and denote the assumed

More information

Common Discrete Distributions

Common Discrete Distributions Common Discrete Distributions Statistics 104 Autumn 2004 Taken from Statistics 110 Lecture Notes Copyright c 2004 by Mark E. Irwin Common Discrete Distributions There are a wide range of popular discrete

More information

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models

System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models System Simulation Part II: Mathematical and Statistical Models Chapter 5: Statistical Models Fatih Cavdur fatihcavdur@uludag.edu.tr March 29, 2014 Introduction Introduction The world of the model-builder

More information

Random variable X is a mapping that maps each outcome s in the sample space to a unique real number x, < x <. ( ) X s. Real Line

Random variable X is a mapping that maps each outcome s in the sample space to a unique real number x, < x <. ( ) X s. Real Line Random Variable Random variable is a mapping that maps each outcome s in the sample space to a unique real number, <

More information

Random Variables Chris Piech CS109, Stanford University. Piech, CS106A, Stanford University

Random Variables Chris Piech CS109, Stanford University. Piech, CS106A, Stanford University Random Variables Chris Piech CS109, Stanford University Piech, CS106A, Stanford University Piech, CS106A, Stanford University Let s Play a Game Game set-up We have a fair coin (come up heads with p = 0.5)

More information

Lecture 13. Poisson Distribution. Text: A Course in Probability by Weiss 5.5. STAT 225 Introduction to Probability Models February 16, 2014

Lecture 13. Poisson Distribution. Text: A Course in Probability by Weiss 5.5. STAT 225 Introduction to Probability Models February 16, 2014 Lecture 13 Text: A Course in Probability by Weiss 5.5 STAT 225 Introduction to Probability Models February 16, 2014 Whitney Huang Purdue University 13.1 Agenda 1 2 3 13.2 Review So far, we have seen discrete

More information

EE/CpE 345. Modeling and Simulation. Fall Class 5 September 30, 2002

EE/CpE 345. Modeling and Simulation. Fall Class 5 September 30, 2002 EE/CpE 345 Modeling and Simulation Class 5 September 30, 2002 Statistical Models in Simulation Real World phenomena of interest Sample phenomena select distribution Probabilistic, not deterministic Model

More information

Math 180A. Lecture 16 Friday May 7 th. Expectation. Recall the three main probability density functions so far (1) Uniform (2) Exponential.

Math 180A. Lecture 16 Friday May 7 th. Expectation. Recall the three main probability density functions so far (1) Uniform (2) Exponential. Math 8A Lecture 6 Friday May 7 th Epectation Recall the three main probability density functions so far () Uniform () Eponential (3) Power Law e, ( ), Math 8A Lecture 6 Friday May 7 th Epectation Eample

More information

Practice Exam 1: Long List 18.05, Spring 2014

Practice Exam 1: Long List 18.05, Spring 2014 Practice Eam : Long List 8.05, Spring 204 Counting and Probability. A full house in poker is a hand where three cards share one rank and two cards share another rank. How many ways are there to get a full-house?

More information

Continuous-Valued Probability Review

Continuous-Valued Probability Review CS 6323 Continuous-Valued Probability Review Prof. Gregory Provan Department of Computer Science University College Cork 2 Overview Review of discrete distributions Continuous distributions 3 Discrete

More information

Central Limit Theorem and the Law of Large Numbers Class 6, Jeremy Orloff and Jonathan Bloom

Central Limit Theorem and the Law of Large Numbers Class 6, Jeremy Orloff and Jonathan Bloom Central Limit Theorem and the Law of Large Numbers Class 6, 8.5 Jeremy Orloff and Jonathan Bloom Learning Goals. Understand the statement of the law of large numbers. 2. Understand the statement of the

More information

HW7 Solutions. f(x) = 0 otherwise. 0 otherwise. The density function looks like this: = 20 if x [10, 90) if x [90, 100]

HW7 Solutions. f(x) = 0 otherwise. 0 otherwise. The density function looks like this: = 20 if x [10, 90) if x [90, 100] HW7 Solutions. 5 pts.) James Bond James Bond, my favorite hero, has again jumped off a plane. The plane is traveling from from base A to base B, distance km apart. Now suppose the plane takes off from

More information

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations

Chapter 5. Statistical Models in Simulations 5.1. Prof. Dr. Mesut Güneş Ch. 5 Statistical Models in Simulations Chapter 5 Statistical Models in Simulations 5.1 Contents Basic Probability Theory Concepts Discrete Distributions Continuous Distributions Poisson Process Empirical Distributions Useful Statistical Models

More information

continuous random variables

continuous random variables continuous random variables continuous random variables Discrete random variable: takes values in a finite or countable set, e.g. X {1,2,..., 6} with equal probability X is positive integer i with probability

More information

Lecture 14. Text: A Course in Probability by Weiss 5.6. STAT 225 Introduction to Probability Models February 23, Whitney Huang Purdue University

Lecture 14. Text: A Course in Probability by Weiss 5.6. STAT 225 Introduction to Probability Models February 23, Whitney Huang Purdue University Lecture 14 Text: A Course in Probability by Weiss 5.6 STAT 225 Introduction to Probability Models February 23, 2014 Whitney Huang Purdue University 14.1 Agenda 14.2 Review So far, we have covered Bernoulli

More information

Midterm Exam 1 Solution

Midterm Exam 1 Solution EECS 126 Probability and Random Processes University of California, Berkeley: Fall 2015 Kannan Ramchandran September 22, 2015 Midterm Exam 1 Solution Last name First name SID Name of student on your left:

More information

EE 302 Division 1. Homework 6 Solutions.

EE 302 Division 1. Homework 6 Solutions. EE 3 Division. Homework 6 Solutions. Problem. A random variable X has probability density { C f X () e λ,,, otherwise, where λ is a positive real number. Find (a) The constant C. Solution. Because of the

More information

Guidelines for Solving Probability Problems

Guidelines for Solving Probability Problems Guidelines for Solving Probability Problems CS 1538: Introduction to Simulation 1 Steps for Problem Solving Suggested steps for approaching a problem: 1. Identify the distribution What distribution does

More information

GEOMETRIC -discrete A discrete random variable R counts number of times needed before an event occurs

GEOMETRIC -discrete A discrete random variable R counts number of times needed before an event occurs STATISTICS 4 Summary Notes. Geometric and Exponential Distributions GEOMETRIC -discrete A discrete random variable R counts number of times needed before an event occurs P(X = x) = ( p) x p x =,, 3,...

More information

Massachusetts Institute of Technology

Massachusetts Institute of Technology 6.04/6.4: Probabilistic Systems Analysis Fall 00 Quiz Solutions: October, 00 Problem.. 0 points Let R i be the amount of time Stephen spends at the ith red light. R i is a Bernoulli random variable with

More information

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr.

Computer Science, Informatik 4 Communication and Distributed Systems. Simulation. Discrete-Event System Simulation. Dr. Simulation Discrete-Event System Simulation Chapter 4 Statistical Models in Simulation Purpose & Overview The world the model-builder sees is probabilistic rather than deterministic. Some statistical model

More information

STAT2201. Analysis of Engineering & Scientific Data. Unit 3

STAT2201. Analysis of Engineering & Scientific Data. Unit 3 STAT2201 Analysis of Engineering & Scientific Data Unit 3 Slava Vaisman The University of Queensland School of Mathematics and Physics What we learned in Unit 2 (1) We defined a sample space of a random

More information

MATH 3510: PROBABILITY AND STATS July 1, 2011 FINAL EXAM

MATH 3510: PROBABILITY AND STATS July 1, 2011 FINAL EXAM MATH 3510: PROBABILITY AND STATS July 1, 2011 FINAL EXAM YOUR NAME: KEY: Answers in blue Show all your work. Answers out of the blue and without any supporting work may receive no credit even if they are

More information

CDA6530: Performance Models of Computers and Networks. Chapter 2: Review of Practical Random Variables

CDA6530: Performance Models of Computers and Networks. Chapter 2: Review of Practical Random Variables CDA6530: Performance Models of Computers and Networks Chapter 2: Review of Practical Random Variables Two Classes of R.V. Discrete R.V. Bernoulli Binomial Geometric Poisson Continuous R.V. Uniform Exponential,

More information

Fundamental Tools - Probability Theory II

Fundamental Tools - Probability Theory II Fundamental Tools - Probability Theory II MSc Financial Mathematics The University of Warwick September 29, 2015 MSc Financial Mathematics Fundamental Tools - Probability Theory II 1 / 22 Measurable random

More information

L06. Chapter 6: Continuous Probability Distributions

L06. Chapter 6: Continuous Probability Distributions L06 Chapter 6: Continuous Probability Distributions Probability Chapter 6 Continuous Probability Distributions Recall Discrete Probability Distributions Could only take on particular values Continuous

More information

ECS /1 Part IV.2 Dr.Prapun

ECS /1 Part IV.2 Dr.Prapun Sirindhorn International Institute of Technology Thammasat University School of Information, Computer and Communication Technology ECS35 4/ Part IV. Dr.Prapun.4 Families of Continuous Random Variables

More information

Review of Probability. CS1538: Introduction to Simulations

Review of Probability. CS1538: Introduction to Simulations Review of Probability CS1538: Introduction to Simulations Probability and Statistics in Simulation Why do we need probability and statistics in simulation? Needed to validate the simulation model Needed

More information

Random Variables Example:

Random Variables Example: Random Variables Example: We roll a fair die 6 times. Suppose we are interested in the number of 5 s in the 6 rolls. Let X = number of 5 s. Then X could be 0, 1, 2, 3, 4, 5, 6. X = 0 corresponds to the

More information

Notes on Continuous Random Variables

Notes on Continuous Random Variables Notes on Continuous Random Variables Continuous random variables are random quantities that are measured on a continuous scale. They can usually take on any value over some interval, which distinguishes

More information

CSE 312, 2017 Winter, W.L. Ruzzo. 7. continuous random variables

CSE 312, 2017 Winter, W.L. Ruzzo. 7. continuous random variables CSE 312, 2017 Winter, W.L. Ruzzo 7. continuous random variables The new bit continuous random variables Discrete random variable: values in a finite or countable set, e.g. X {1,2,..., 6} with equal probability

More information

Continuous-time Markov Chains

Continuous-time Markov Chains Continuous-time Markov Chains Gonzalo Mateos Dept. of ECE and Goergen Institute for Data Science University of Rochester gmateosb@ece.rochester.edu http://www.ece.rochester.edu/~gmateosb/ October 23, 2017

More information

Stat 100a, Introduction to Probability.

Stat 100a, Introduction to Probability. Stat 100a, Introduction to Probability. Outline for the day: 1. Geometric random variables. 2. Negative binomial random variables. 3. Moment generating functions. 4. Poisson random variables. 5. Continuous

More information

Central Theorems Chris Piech CS109, Stanford University

Central Theorems Chris Piech CS109, Stanford University Central Theorems Chris Piech CS109, Stanford University Silence!! And now a moment of silence......before we present......a beautiful result of probability theory! Four Prototypical Trajectories Central

More information

Discrete Mathematics and Probability Theory Summer 2014 James Cook Final Exam

Discrete Mathematics and Probability Theory Summer 2014 James Cook Final Exam CS 70 Discrete Mathematics and Probability Theory Summer 2014 James Cook Final Exam Friday August 15, 2014, 5:10pm-8:10pm. Instructions: Do not turn over this page until the proctor tells you to. Don t

More information

CS 1538: Introduction to Simulation Homework 1

CS 1538: Introduction to Simulation Homework 1 CS 1538: Introduction to Simulation Homework 1 1. A fair six-sided die is rolled three times. Let X be a random variable that represents the number of unique outcomes in the three tosses. For example,

More information

STAT 418: Probability and Stochastic Processes

STAT 418: Probability and Stochastic Processes STAT 418: Probability and Stochastic Processes Spring 2016; Homework Assignments Latest updated on April 29, 2016 HW1 (Due on Jan. 21) Chapter 1 Problems 1, 8, 9, 10, 11, 18, 19, 26, 28, 30 Theoretical

More information

Continuous distributions

Continuous distributions CHAPTER 7 Continuous distributions 7.. Introduction A r.v. X is said to have a continuous distribution if there exists a nonnegative function f such that P(a X b) = ˆ b a f(x)dx for every a and b. distribution.)

More information

Probability theory for Networks (Part 1) CS 249B: Science of Networks Week 02: Monday, 02/04/08 Daniel Bilar Wellesley College Spring 2008

Probability theory for Networks (Part 1) CS 249B: Science of Networks Week 02: Monday, 02/04/08 Daniel Bilar Wellesley College Spring 2008 Probability theory for Networks (Part 1) CS 249B: Science of Networks Week 02: Monday, 02/04/08 Daniel Bilar Wellesley College Spring 2008 1 Review We saw some basic metrics that helped us characterize

More information

CS 361: Probability & Statistics

CS 361: Probability & Statistics February 19, 2018 CS 361: Probability & Statistics Random variables Markov s inequality This theorem says that for any random variable X and any value a, we have A random variable is unlikely to have an

More information

Special distributions

Special distributions Special distributions August 22, 2017 STAT 101 Class 4 Slide 1 Outline of Topics 1 Motivation 2 Bernoulli and binomial 3 Poisson 4 Uniform 5 Exponential 6 Normal STAT 101 Class 4 Slide 2 What distributions

More information

Random variables. DS GA 1002 Probability and Statistics for Data Science.

Random variables. DS GA 1002 Probability and Statistics for Data Science. Random variables DS GA 1002 Probability and Statistics for Data Science http://www.cims.nyu.edu/~cfgranda/pages/dsga1002_fall17 Carlos Fernandez-Granda Motivation Random variables model numerical quantities

More information

STAT 414: Introduction to Probability Theory

STAT 414: Introduction to Probability Theory STAT 414: Introduction to Probability Theory Spring 2016; Homework Assignments Latest updated on April 29, 2016 HW1 (Due on Jan. 21) Chapter 1 Problems 1, 8, 9, 10, 11, 18, 19, 26, 28, 30 Theoretical Exercises

More information

1. I had a computer generate the following 19 numbers between 0-1. Were these numbers randomly selected?

1. I had a computer generate the following 19 numbers between 0-1. Were these numbers randomly selected? Activity #10: Continuous Distributions Uniform, Exponential, Normal) 1. I had a computer generate the following 19 numbers between 0-1. Were these numbers randomly selected? 0.12374454, 0.19609266, 0.44248450,

More information

CS 237: Probability in Computing

CS 237: Probability in Computing CS 237: Probability in Computing Wayne Snyder Computer Science Department Boston University Lecture 11: Geometric Distribution Poisson Process Poisson Distribution Geometric Distribution The Geometric

More information

Random Variable. Discrete Random Variable. Continuous Random Variable. Discrete Random Variable. Discrete Probability Distribution

Random Variable. Discrete Random Variable. Continuous Random Variable. Discrete Random Variable. Discrete Probability Distribution Random Variable Theoretical Probability Distribution Random Variable Discrete Probability Distributions A variable that assumes a numerical description for the outcome of a random eperiment (by chance).

More information

Lecture 3. Discrete Random Variables

Lecture 3. Discrete Random Variables Math 408 - Mathematical Statistics Lecture 3. Discrete Random Variables January 23, 2013 Konstantin Zuev (USC) Math 408, Lecture 3 January 23, 2013 1 / 14 Agenda Random Variable: Motivation and Definition

More information

Lecture 13: Covariance. Lisa Yan July 25, 2018

Lecture 13: Covariance. Lisa Yan July 25, 2018 Lecture 13: Covariance Lisa Yan July 25, 2018 Announcements Hooray midterm Grades (hopefully) by Monday Problem Set #3 Should be graded by Monday as well (instead of Friday) Quick note about Piazza 2 Goals

More information

Why study probability? Set theory. ECE 6010 Lecture 1 Introduction; Review of Random Variables

Why study probability? Set theory. ECE 6010 Lecture 1 Introduction; Review of Random Variables ECE 6010 Lecture 1 Introduction; Review of Random Variables Readings from G&S: Chapter 1. Section 2.1, Section 2.3, Section 2.4, Section 3.1, Section 3.2, Section 3.5, Section 4.1, Section 4.2, Section

More information

Gradient Ascent Chris Piech CS109, Stanford University

Gradient Ascent Chris Piech CS109, Stanford University Gradient Ascent Chris Piech CS109, Stanford University Our Path Deep Learning Linear Regression Naïve Bayes Logistic Regression Parameter Estimation Our Path Deep Learning Linear Regression Naïve Bayes

More information

PRACTICE PROBLEMS FOR EXAM 2

PRACTICE PROBLEMS FOR EXAM 2 PRACTICE PROBLEMS FOR EXAM 2 Math 3160Q Fall 2015 Professor Hohn Below is a list of practice questions for Exam 2. Any quiz, homework, or example problem has a chance of being on the exam. For more practice,

More information

Lecture 8 : The Geometric Distribution

Lecture 8 : The Geometric Distribution 0/ 24 The geometric distribution is a special case of negative binomial, it is the case r = 1. It is so important we give it special treatment. Motivating example Suppose a couple decides to have children

More information

Chapter 4. Probability-The Study of Randomness

Chapter 4. Probability-The Study of Randomness Chapter 4. Probability-The Study of Randomness 4.1.Randomness Random: A phenomenon- individual outcomes are uncertain but there is nonetheless a regular distribution of outcomes in a large number of repetitions.

More information

HW1 (due 10/6/05): (from textbook) 1.2.3, 1.2.9, , , (extra credit) A fashionable country club has 100 members, 30 of whom are

HW1 (due 10/6/05): (from textbook) 1.2.3, 1.2.9, , , (extra credit) A fashionable country club has 100 members, 30 of whom are HW1 (due 10/6/05): (from textbook) 1.2.3, 1.2.9, 1.2.11, 1.2.12, 1.2.16 (extra credit) A fashionable country club has 100 members, 30 of whom are lawyers. Rumor has it that 25 of the club members are liars

More information

Notes 12 Autumn 2005

Notes 12 Autumn 2005 MAS 08 Probability I Notes Autumn 005 Conditional random variables Remember that the conditional probability of event A given event B is P(A B) P(A B)/P(B). Suppose that X is a discrete random variable.

More information

Discussion 03 Solutions

Discussion 03 Solutions STAT Discussion Solutions Spring 8. A new flavor of toothpaste has been developed. It was tested by a group of people. Nine of the group said they liked the new flavor, and the remaining indicated they

More information

Massachusetts Institute of Technology Department of Electrical Engineering & Computer Science 6.041/6.431: Probabilistic Systems Analysis

Massachusetts Institute of Technology Department of Electrical Engineering & Computer Science 6.041/6.431: Probabilistic Systems Analysis 6.04/6.43: Probabilistic Systems Analysis Question : Multiple choice questions. CLEARLY circle the best answer for each question below. Each question is worth 4 points each, with no partial credit given.

More information

Transform Techniques - CF

Transform Techniques - CF Transform Techniques - CF [eview] Moment Generating Function For a real t, the MGF of the random variable is t t M () t E[ e ] e Characteristic Function (CF) k t k For a real ω, the characteristic function

More information

CSE 312 Foundations, II Final Exam

CSE 312 Foundations, II Final Exam CSE 312 Foundations, II Final Exam 1 Anna Karlin June 11, 2014 DIRECTIONS: Closed book, closed notes except for one 8.5 11 sheet. Time limit 110 minutes. Calculators allowed. Grading will emphasize problem

More information

Continuous Random Variables. What continuous random variables are and how to use them. I can give a definition of a continuous random variable.

Continuous Random Variables. What continuous random variables are and how to use them. I can give a definition of a continuous random variable. Continuous Random Variables Today we are learning... What continuous random variables are and how to use them. I will know if I have been successful if... I can give a definition of a continuous random

More information

Probability reminders

Probability reminders CS246 Winter 204 Mining Massive Data Sets Probability reminders Sammy El Ghazzal selghazz@stanfordedu Disclaimer These notes may contain typos, mistakes or confusing points Please contact the author so

More information

Chapter 2. Random Variable. Define single random variables in terms of their PDF and CDF, and calculate moments such as the mean and variance.

Chapter 2. Random Variable. Define single random variables in terms of their PDF and CDF, and calculate moments such as the mean and variance. Chapter 2 Random Variable CLO2 Define single random variables in terms of their PDF and CDF, and calculate moments such as the mean and variance. 1 1. Introduction In Chapter 1, we introduced the concept

More information

Transform Techniques - CF

Transform Techniques - CF Transform Techniques - CF [eview] Moment Generating Function For a real t, the MGF of the random variable is t t M () t E[ e ] e Characteristic Function (CF) k t k For a real ω, the characteristic function

More information

Was there under-representation of African-Americans in the jury pool in the case of Berghuis v. Smith?

Was there under-representation of African-Americans in the jury pool in the case of Berghuis v. Smith? 1. The United States Supreme Court recently considered Berghuis v. Smith, the case of Diapolis Smith, an African-American man convicted in 1993 of second-degree murder by an all-white jury in Kent County,

More information

Chapter 3 Single Random Variables and Probability Distributions (Part 1)

Chapter 3 Single Random Variables and Probability Distributions (Part 1) Chapter 3 Single Random Variables and Probability Distributions (Part 1) Contents What is a Random Variable? Probability Distribution Functions Cumulative Distribution Function Probability Density Function

More information

Analysis of Engineering and Scientific Data. Semester

Analysis of Engineering and Scientific Data. Semester Analysis of Engineering and Scientific Data Semester 1 2019 Sabrina Streipert s.streipert@uq.edu.au Example: Draw a random number from the interval of real numbers [1, 3]. Let X represent the number. Each

More information

Statistics 100A Homework 5 Solutions

Statistics 100A Homework 5 Solutions Chapter 5 Statistics 1A Homework 5 Solutions Ryan Rosario 1. Let X be a random variable with probability density function a What is the value of c? fx { c1 x 1 < x < 1 otherwise We know that for fx to

More information

Chapter 2: Random Variables

Chapter 2: Random Variables ECE54: Stochastic Signals and Systems Fall 28 Lecture 2 - September 3, 28 Dr. Salim El Rouayheb Scribe: Peiwen Tian, Lu Liu, Ghadir Ayache Chapter 2: Random Variables Example. Tossing a fair coin twice:

More information

MTH135/STA104: Probability

MTH135/STA104: Probability MTH5/STA4: Probability Homework # Due: Tuesday, Dec 6, 5 Prof Robert Wolpert Three subjects in a medical trial are given drug A After one week, those that do not respond favorably are switched to drug

More information

Lecture 2: CDF and EDF

Lecture 2: CDF and EDF STAT 425: Introduction to Nonparametric Statistics Winter 2018 Instructor: Yen-Chi Chen Lecture 2: CDF and EDF 2.1 CDF: Cumulative Distribution Function For a random variable X, its CDF F () contains all

More information

Discrete Random Variables

Discrete Random Variables CPSC 53 Systems Modeling and Simulation Discrete Random Variables Dr. Anirban Mahanti Department of Computer Science University of Calgary mahanti@cpsc.ucalgary.ca Random Variables A random variable is

More information

Math 407: Probability Theory 5/10/ Final exam (11am - 1pm)

Math 407: Probability Theory 5/10/ Final exam (11am - 1pm) Math 407: Probability Theory 5/10/2013 - Final exam (11am - 1pm) Name: USC ID: Signature: 1. Write your name and ID number in the spaces above. 2. Show all your work and circle your final answer. Simplify

More information

Chapter 2: The Random Variable

Chapter 2: The Random Variable Chapter : The Random Variable The outcome of a random eperiment need not be a number, for eample tossing a coin or selecting a color ball from a bo. However we are usually interested not in the outcome

More information

CDA6530: Performance Models of Computers and Networks. Chapter 2: Review of Practical Random

CDA6530: Performance Models of Computers and Networks. Chapter 2: Review of Practical Random CDA6530: Performance Models of Computers and Networks Chapter 2: Review of Practical Random Variables Definition Random variable (RV)X (R.V.) X: A function on sample space X: S R Cumulative distribution

More information