Presentation is loading. Please wait.

Presentation is loading. Please wait.

HUDM4122 Probability and Statistical Inference

Similar presentations


Presentation on theme: "HUDM4122 Probability and Statistical Inference"— Presentation transcript:

1 HUDM4122 Probability and Statistical Inference
February 23, 2015

2 In the last class We studied Bayes’ Theorem and the Law of Total Probability

3 Any questions or comments?

4 Today Chapter 4.8 in Mendenhall, Beaver, & Beaver
Probability Distributions Random Variables

5 Random Variable “A variable x is a random variable if the value that it assumes, corresponding to the outcome of an experiment, is a chance or random event.” – MBB, p.158 “A random variable is a variable whose value is subject to variations due to chance.” -- Wikipedia

6 Random Variable It is not that the variable can have any value at random But that the variable’s value comes from random sampling

7 These are random variables
A coin flip’s result Number of times a randomly selected student is sent to the principal’s office NY Regents Exam score for a randomly selected student in NY State Number of people on the subway at a randomly selected time

8 These are not random variables
I flip a biased coin that gives 100% heads The temperature setting on your oven – you set it yourself These values are not subject to chance

9 A random variable’s value
You can never say for sure what it’s going to be There is a certainly probability that it will have certain values

10 Questions? Comments?

11 Reminder Discrete variable Continuous/numerical variable
Can have limited number of values Continuous/numerical variable Can have infinite number of values

12 Which of these are Discrete Variables?
Number of heads in 3 coin flips Sum of rolling two 6-sided dice Temperature outside How late is 2 train Height of a person, rounded to closest inch Number of times a randomly selected student is sent to the principal’s office

13 Probability Distribution
A probability distribution for random variable X gives the possible values of X, x1…xn And the probability p(xi) associated with each value of X

14 Probability Distribution
A probability distribution for random variable X gives the possible values of X, x1…xn And the probability p(xi) associated with each value of X Each value of X is mutually exclusive The sum of p(xi) adds to 1

15 Example I flip a coin twice The number of heads can be 0, 1, or 2
TT: 0 TH:1 HT:1 HH:2

16 Example x P(x) 1 2 I flip a coin twice
The number of heads can be 0, 1, or 2 TT: 0 TH:1 HT:1 HH:2 x P(x) 1 2

17 Example x P(x) 1/4 1 2/4 2 I flip a coin twice
The number of heads can be 0, 1, or 2 TT: 0 TH:1 HT:1 HH:2 x P(x) 1/4 1 2/4 2

18 Example x P(x) 1/4 1 1/2 2 I flip a coin twice
The number of heads can be 0, 1, or 2 TT: 0 TH:1 HT:1 HH:2 x P(x) 1/4 1 1/2 2

19 Example x P(x) 0.25 1 0.5 2 I flip a coin twice
The number of heads can be 0, 1, or 2 TT: 0 TH:1 HT:1 HH:2 x P(x) 0.25 1 0.5 2

20 Probability Histogram
x P(x) 0.25 1 0.5 2

21 You try it I flip a coin three times
What is the probability distribution on the number of heads?

22 You try it: What is the Probability Distribution?
I collected the following data on the temperature in NYC Day Temp 1 Cold 9 2 10 3 Freezing 11 4 12 Not That Bad 5 13 6 14 F’ing Freezing 7 15 8 16

23 Note that probability distributions can have many values

24 Later in the semester We’ll talk about probability distributions for continuous variables

25 Questions? Comments?

26 Expected Value of Probability Distribution
The value you can expect to get on average if you re-run your experiment many times Take each value, multiply it by its probability Add those together E(x) = 𝑥∗𝑝(𝑥)

27 Expected Value of Probability Distribution
The value you can expect to get on average if you re-run your experiment many times Take each value, multiply it by its probability Add those together E(x) = 𝑥∗𝑝(𝑥) This is also called the mean of the random variable, m

28 Example 0(0.25) + 1(0.5) + 2(0.25) x P(x) 0.25 1 0.5 2

29 Example = 1 x P(x) 0.25 1 0.5 2

30 You can expect 1 head on average if you flip a coin twice, infinite times
= 1 x P(x) 0.25 1 0.5 2

31 You Try It x P(x) 0.1 1 0.5 2 0.2 3

32 You Try It x P(x) 0.1 1 0.5 2 0.2 3 0(0.1)+1(0.5)+2(0.2)+3(0.2)

33 You Try It x P(x) 0.1 1 0.5 2 0.2 3 = 1.5

34 You Try It My dad’s barber has played the lottery every day for 40 years (a.k.a. 14,600 times), at $1 a ticket One time he won $1000 What is the expected value for playing the lottery?

35 You Try It My dad’s barber has played the lottery every day for 40 years (a.k.a. 14,600 times), at $1 a ticket One time he won $1000 What is the expected value for playing the lottery? (1/14600)(1000) + (14599/14600)(-1)

36 You Try It My dad’s barber has played the lottery every day for 40 years (a.k.a. 14,600 times), at $1 a ticket One time he won $1000 What is the expected value for playing the lottery? (1/14600)(1000) + (14599/14600)(-1)= – = $-0.931

37 Questions? Comments?

38 Variance of Discrete Random Variable
𝑥−𝜇 2 𝑝(𝑥)

39 Standard Deviation of Discrete Random Variable
𝑥−𝜇 2 𝑝(𝑥)

40 Example: SD of Random Variable
P(x) 0.25 1 0.5 2

41 Example: SD of Random Variable
P(x) 0.25 1 0.5 2 Recall: m = 1

42 Example: SD of Random Variable
P(x) 0.25 1 0.5 2 Recall: m = 1 𝑥−𝜇 2 𝑝(𝑥)

43 Example: SD of Random Variable
P(x) 0.25 1 0.5 2 Recall: m = 1 0−1 2 (0.25)+ 1− −

44 Example: SD of Random Variable
P(x) 0.25 1 0.5 2 Recall: m = 1 1(0.25)

45 Example: SD of Random Variable
P(x) 0.25 1 0.5 2 Recall: m = 1

46 Example: SD of Random Variable
P(x) 0.25 1 0.5 2 Recall: m = 1 0.707

47 You Try It: SD of random variable
x P(x) 0.1 1 0.5 2 0.2 3 m = 1.5

48 Any last comments or questions for the day?

49 If there’s time: Do this in solver-explainer pairs
Practice with extended version of Bayes Rule 𝑃( 𝑆 𝑖 |𝐴) = 𝑃 𝑆 𝑖 𝑃 𝐴 𝑆 𝑖 ) 𝑗=1 𝑘 𝑃 𝑆 𝑗 𝑃(𝐴| 𝑆 𝑗 )

50 Example There are three professors who teach HUDM4122. Let’s call them A, B, and C P(student is in prof A’s class) = P(A) = 0.4 P(student is in prof B’s class) = P(B) = 0.3 P(student is in prof C’s class) = P(C) = 0.1

51 Example P(student is in prof A’s class) = P(A) = 0.4
P(student is in prof B’s class) = P(B) = 0.3 P(student is in prof C’s class) = P(C) = 0.1 P(learned stats|A)=0.8 P(learned stats|B)=0.6 P(learned stats|C)=0.4

52 What is P(A | learned stats)?
P(student is in prof A’s class) = P(A) = 0.4 P(student is in prof B’s class) = P(B) = 0.3 P(student is in prof C’s class) = P(C) = 0.1 P(learned stats|A)=0.8 P(learned stats|B)=0.6 P(learned stats|C)=0.4

53 Upcoming Classes 2/25 Binomial Probability Distribution
Ch. 5-2 HW 4 due 2/28 Normal Probability Distribution

54 Homework 4 Due in 2 days In the ASSISTments system


Download ppt "HUDM4122 Probability and Statistical Inference"

Similar presentations


Ads by Google