Presentation is loading. Please wait.

Presentation is loading. Please wait.

S1: Chapter 8 Discrete Random Variables Dr J Frost Last modified: 25 th October 2013.

Similar presentations


Presentation on theme: "S1: Chapter 8 Discrete Random Variables Dr J Frost Last modified: 25 th October 2013."— Presentation transcript:

1 S1: Chapter 8 Discrete Random Variables Dr J Frost (jfrost@tiffin.kingston.sch.uk) Last modified: 25 th October 2013

2 Variables and Random Variables x123456 P(X=x)0.30.20.10.250.050.1 A random variable representing the throw of an unfair die: 1. THE OUTCOMES /SUPPORT VECTOR We tend to use a lowercase variable letter to represent the value of the outcome. ?

3 Is it a discrete random variable? The height of a person randomly chosen. The number of cars that pass in the next hour. The number of countries in the world.  NoYes  NoYes  NoYes This is a continuous random variable. It does not vary, so is not a variable!

4 Notation and Terminology The are two equivalent ways of writing a probability: Full notation:Shorthand:

5 Example Underlying Sample Space { HHH, HHT, HTT, HTH, THH, THT, TTH, TTT } Probability Function Num heads x0123 P(X=x)1/83/8 1/8 The second way of writing it allows us to conflate outcomes with the same probability. In the Edexcel syllabus, we call the table a probability distribution and the latter form a probability function. The true distinction is slightly abstract/subtle: don’t worry about it for now! ? ?

6 Exam Question Edexcel S1 May 2012 ?

7 Exercise 8A 5 7 x1234 P(X = x)0.125 0.375 ?

8 Probabilities of ranges of values x123456 P(X=x)0.10.20.30.250.10.05 ? ? ? ?

9 Cumulative Distribution Function (CDF) ? ? x012 P(X=x)0.250.50.25 x012 F(x)0.250.751 If X is the number of heads thrown in 2 throws... ??? ???

10 Example x123 F(x)3/47/81 ??? a x123 P(X=x)3/41/8 b c d ??? ? ?

11 CDF Shoe Size (x) p(x) Shoe Size (x) F(x) 1 It’s just like how we’d turn a frequency graph into a cumulative frequency graph. ?

12 Exam Questions Edexcel S1 May 2013 (Retracted) x123 P(X = x)0.40.250.35 = 0.4 ? ? Edexcel S1 Jan 2013 F(3) = 1, so (27 + k)/40 = 1,... x123 P(X = x)0.350.1750.475 ? ?

13 Expected Value, E[X] Suppose that we throw a single fair die 60 times, and see the following outcomes: x123456 Frequency9111081210 But using the actual probabilities of each outcome (i.e. 1/6 for each), what would we expect the average outcome to be? 3.5 ? ?

14 Quickfire E[X] Find the expected value of the following distributions (in your head!). x123 P(X = x)0.10.60.3 E[X] = 2.2 x468 P(X = x)0.50.25 E[X] = 5.5 x102030 P(X = x)1/3 E[X] = 20 ?? ?

15 Harder Example x12345 P(X = x)0.1p0.3q0.2 Given that E[X] = 3, find the values of p and q. p + q + 0.1 + 0.3 + 0.2 = 1 (1 x 0.1) + (2 x q) + (3 x 0.3) + (4 x q) + (5 x 0.2) = 3 Thus q = 0.1, p = 0.3 ?

16 To E[X 2 ] and beyond x123 P(X = x)0.10.50.4 E[X 2 ] = (1 2 x 0.1) + (2 2 x 0.5) + (3 2 x 0.4) = 5.7 E[2X] = (2 x 0.1) + (4 x 0.5) + (6 x 0.4) = 4.6 E[1 – X] = (0 x 0.1) + (-1 x 0.5) + (-2 x 0.4) = -1.3 ? ? ?

17 Variance We know how to find it for experimental data. How about for a random variable? Mean of the SquaresMinusSquare of the Mean E[X 2 ]–E[X] 2 ?? ? x123 P(X = x)0.10.50.4 (We already worked out that E[X 2 ] = 5.7) Var[X] = 5.7 – 2.3 2 = 0.41 Var[X] = ?

18 Exam Questions Edexcel S1 May 2010 Edexcel S1 Jan 2009 a = 1/4 = 1 E[X 2 ] = 3.1 So Var[X] = 3.1 – 1 2 = 2.1 = 1 = P(X <= 1.5) = P(X <= 1) = 0.7 E[X 2 ] = 2. So Var[X] = 2 – 1 2 = 1 ? ? ? ? ? ?

19 Coding! Oh dear god, not again... Recap It’s no different with expected values. What do we expect these to be in terms of the original expected value E[X] and the original variance Var[X]? E[X + 10] = E[X] + 10 E[3X] = 3E[X] Var[3X] = 9Var[X] ? ? ? Adding 10 to all values adds 10 to the expected value. ? ?

20 Quickfire Coding Express these in terms of the original E[X] and Var[X]. E[4X + 1] = 4E[X] + 1 E[1 – X] = 1 – E[X] Var[4X] = 16Var[X] Var[X + 1] = Var[X] Var[3X + 2] = 9Var[X] E[(X-1)/2] = (E[X]-1)/2 Var[(X-1)/2] = ¼ Var[X] ? ? ? ? ? ? ?

21 Exercise 8E E[X] = 2, Var[X] = 6 Find a) E[3X] = 3E[X] = 6 d) E[4 – 2X] = 4 – 2E[X] = 0 f) Var[3X + 1] = 9Var[X] = 54 The random variable Y has mean 2 and variance 9. Find: a) E[3Y+1] = 3E[Y] + 1 = 7 c) Var[3Y+1] = 9Var[Y] = 81 e) E[Y 2 ] = Var[Y] + E[Y] 2 = 13 f) E[(Y-1)(Y+1)] = E[Y 2 – 1] = E[Y 2 ] – 1 = 12 2 5 ? ? ? ? ? ? ?

22 Discrete Uniform distribution x123456 P(X = x)1/6 If X is the throw of a fair die, this obviously is its distribution... We call this a discrete uniform distribution. ? ? If had say an n-sided fair die, then: You won’t have exam questions on these, but they’re useful to know. ? ?

23 Example ? ?


Download ppt "S1: Chapter 8 Discrete Random Variables Dr J Frost Last modified: 25 th October 2013."

Similar presentations


Ads by Google