z2 c n Steve Smith Tuition: Maths Notes iˇ e c2 .Steve Smith Tuition: Maths Notes Discrete Random

download z2 c n Steve Smith Tuition: Maths Notes iˇ e c2 .Steve Smith Tuition: Maths Notes Discrete Random

of 26

  • date post

    25-Aug-2018
  • Category

    Documents

  • view

    213
  • download

    0

Embed Size (px)

Transcript of z2 c n Steve Smith Tuition: Maths Notes iˇ e c2 .Steve Smith Tuition: Maths Notes Discrete Random

  • Maths Notes : Discrete Random Variables Version 1.1

    ei + 1 =

    0

    a2 +

    b2 =

    c2

    zn+1 =z2n+

    c

    V E+ F

    = 2

    Steve Smith Tuition:Steve Smith Tuition:Maths NotesMaths Notes

    Discrete Random Variables

    Contents

    1 Intro 3

    2 The Distribution of Probabilities for a Discrete Random Variable 42.1 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    2.1.1 Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.2 Answer 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.1.3 Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.1.4 Answer 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82.1.5 Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.1.6 Answer 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102.1.7 Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.1.8 Answer 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142.1.9 Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.1.10 Answer 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    3 Expectation and Variance 193.1 The Definition of Expectation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    3.1.1 Expectation Example: Rolling A Die . . . . . . . . . . . . . . . . . . . . . . . 193.1.2 Another Example of Calculating an Expectation . . . . . . . . . . . . . . . . . 20

    3.2 The Definition of Variance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213.2.1 Variance Example: Rolling A Die . . . . . . . . . . . . . . . . . . . . . . . . . 213.2.2 Another Example of Calculating a Variance . . . . . . . . . . . . . . . . . . . 22

    A Sigma (

    ) Notation 24

    B An Alternative Formula For the Variance 25

    Prerequisites

    None.

    1

  • Maths Notes : Discrete Random Variables Version 1.1

    Notes

    None.

    Document History

    Date Version Comments22th November 2012 1.0 Initial creation of the document.26th November 2013 1.1 A few minor tune-ups.

    2

  • Maths Notes : Discrete Random Variables Version 1.1

    1 Intro

    What are Discrete Random Variables? Well, Discrete Random Variables (DRVs) are:

    Variables : that is, they represent numbers that can take different values.

    Discrete : in Maths, the word Discrete means something different to its meaning in everydaylife. In Maths, Discrete means that only certain values of the variable are allowed. The oppo-site of Discrete is Continuous which means that any value is allowed. Examples of discretevariables are (1) the value you get when you roll a dice and (2) the card you get when you pickone from a pack. Examples of continuous variables are (1) the height of someone in your classat school, and (2) the length of a piece of string.

    Random : this means that you can never predict what the outcome of the variable will be.

    3

  • Maths Notes : Discrete Random Variables Version 1.1

    2 The Distribution of Probabilities for a Discrete Random

    Variable

    Because DRVs are random, so that you never know what value of the variable you will get, then thebest we can do is to work out probablilities of results. Usually, probabilities of DRVs are shown in atable, like this

    Result

    Probability

    1 2 3 4 5 6

    16

    16

    16

    16

    16

    16

    This table shows the probabilities of getting each possible result when you roll a fair die. In thesetables, the top row shows the values that can result when you carry out your experiment (in thiscase, rolling the die). The bottom row shows the probability of getting each of those values. Whenyou roll a fair die, each of the 6 possible results can come up, and they are all equally likely to occur.So the probability of each is 1

    6.

    Notice that if you add up all the probabilities you get 1. This makes sense: when you roll a die, youmust get one of the values, and you cant get two different values with one roll (so there is no overlapof results). This is a very important fact about DRVs: the sum of the probabilities has to be 1.

    Important Point!!

    The sum of the probabilitiesfor a DRV is 1

    Normally, the above table is written like this:

    x

    p(X = x)

    1 2 3 4 5 6

    16

    16

    16

    16

    16

    16

    And this is because there is a bit of notation that you need to understand. The DRV itself is usuallydenoted by an upper-case letter, X in this case. So X represents the action of rolling this die. Lower-

    4

  • Maths Notes : Discrete Random Variables Version 1.1

    case letters (x in this case, if the DRV is X) denote the values that X can take. In this example,then, our DRV is X and the values that it can take (x) are 1, 2, 3, 4, 5, or 6. The expressionp(X = x) means the probability that the DRV X can take the value x. So in our case, for example,p(X = 2) = 1

    6, and p(X > 4) = 2

    6. Can you see that? Thats because p(X > 4) would mean the

    probability of getting a value greater than 4. There are only two possibilities of this: 5 or 6, eachhaving a probability of 1

    6of coming up. Hence the probability p(X > 4) will be 1

    6+ 1

    6= 2

    6.

    These tables are called probability distribution tables, because they show how the total probability(which is 1, of course) is distributed between the various possible results.

    5

  • Maths Notes : Discrete Random Variables Version 1.1

    2.1 Examples

    2.1.1 Example 1

    The random variable X is given by the sum of the scores when two ordinary dice are thrown.

    (i) Find the probability distribution of X.

    (ii) Illustrate the distribution and describe the shape of the distribution.

    (iii) Find the values of:

    (a) p(X > 8)

    (b) p(X is even)

    (c) p(|X 7| < 3)

    2.1.2 Answer 1

    (i) The easiest way to visualise the outcomes from this random variable is to draw a table of all thepossible results of throwing these two dice. Heres my attempt:

    1 2 3 4 5 6

    1

    2

    3

    4

    5

    6

    2

    3

    4

    5

    6

    7

    3

    4

    5

    6

    7

    8

    4

    5

    6

    7

    8

    9

    5

    6

    7

    8

    9

    10

    6

    7

    8

    9

    10

    11

    7

    8

    9

    10

    11

    12

    Firstdieroll

    Second die roll

    Each entry in the table is just the values on the two dice added together. Now in order to producea probability distribution, we have to figure out all the possible values of our random variable, andthen the find the probablilities of each happening when you roll the two dice.

    Looking at our table, the set of possible results we could get are 2, 3, 4, ..., 11, 12.

    x

    p(X = x)

    2 3 4 5 6 7 8 9 10 11 12

    136

    236

    336

    436

    536

    636

    536

    436

    336

    236

    136

    6

  • Maths Notes : Discrete Random Variables Version 1.1

    (ii) Heres a picture of the distribution:

    136

    236

    336

    436

    536

    636

    2 3 4 5 6 7 8 9 10 11 12

    The distribution is symmetric. It reaches a peak in the middle (p(X = 7) = 636

    ), and it goes down inthe same way on either side of x = 7.

    (iii) (a) p(X > 8) will be the probability of getting the sum on the dice to be greater than 8: i.e. 9, 10,11 or 12. If you add up the probabilities of getting those values, you get 4

    36+ 3

    36+ 2

    36+ 1

    36= 10

    36= 5

    18.

    (iii) (b) p(X is even) will be the probability of getting the sum on the dice to be 2, 4, 6, 8 10 or 12.If you add up the probabilities of getting those values, you get 1

    36+ 3

    36+ 5

    36+ 5

    36+ 3

    36+ 1

    36= 18

    36= 1

    2.

    (iii) (c) To get the probability of p(|X7| < 3) we need to first understand what |X7| means. Themodulus signs (the vertical lines) around something say something very simple: make me positive.So, for example, |3| is just 3, but | 3| is 3 as well. I think we need another little table:

    x

    x 7

    |x 7|

    2

    5

    5

    3

    4

    4

    4

    3

    3

    5

    2

    2

    6

    1

    1

    7

    0

    0

    8

    1

    1

    9

    2

    2

    10

    3

    3

    11

    4

    4

    12

    5

    5

    This table lists all the values x can take (on the top row), then for those values of x what thecorresponding value of x 7 would be (the middle row), and finally the values of |x 7| for each x(in the third row).

    So the only values |x 7| can take are 0, 1, 2, 3, 4 and 5. And we want this value to be lessthan 3. So the probability of getting a result that corresponds to a value of |x 7| < 3 would bep(X = 5) + p(X = 6) + p(X = 7) + p(X = 8) + p(X = 9) = 4

    36+ 5

    36+ 6

    36+ 5

    36+ 4

    36= 24

    36= 2

    3.

    7

  • Maths Notes : Discrete Random Variables Version 1.1

    2.1.3 Example 2

    The random variable Y is given by the absolute difference between the scores when two ordinary diceare thrown.

    (i) Find the probability distribution of Y .

    (ii) Illustrate the distribution and describe the shape of the distribution.

    (iii) Find the values of:

    (a) p(Y < 3)

    (b) p(Y is odd)

    2.1.4 Answer 2

    (i) The easiest way to visualise this random variable is to draw a table of all the possible result