Steve Smith Tuition: Maths Notes

Similar documents
Mathematics. ( : Focus on free Education) (Chapter 16) (Probability) (Class XI) Exercise 16.2

Probability: Terminology and Examples Class 2, Jeremy Orloff and Jonathan Bloom

Notes 6 Autumn Example (One die: part 1) One fair six-sided die is thrown. X is the number showing.

What is Probability? Probability. Sample Spaces and Events. Simple Event

What is a random variable

27 Binary Arithmetic: An Application to Programming

Homework 4 Solution, due July 23

Probability Year 10. Terminology

Probability Year 9. Terminology

Problems from Probability and Statistical Inference (9th ed.) by Hogg, Tanis and Zimmerman.

Why should you care?? Intellectual curiosity. Gambling. Mathematically the same as the ESP decision problem we discussed in Week 4.

Probability. VCE Maths Methods - Unit 2 - Probability

MAT Mathematics in Today's World

Deep Learning for Computer Vision


Introduction to Probability and Sample Spaces

324 Stat Lecture Notes (1) Probability

6.2 Introduction to Probability. The Deal. Possible outcomes: STAT1010 Intro to probability. Definitions. Terms: What are the chances of?

Basic Probability. Introduction

CSC Discrete Math I, Spring Discrete Probability

P (A) = P (B) = P (C) = P (D) =

Random Variables. Statistics 110. Summer Copyright c 2006 by Mark E. Irwin

MODULE 2 RANDOM VARIABLE AND ITS DISTRIBUTION LECTURES DISTRIBUTION FUNCTION AND ITS PROPERTIES

Statistics 1. Edexcel Notes S1. Mathematical Model. A mathematical model is a simplification of a real world problem.

Conditional Probability, Independence and Bayes Theorem Class 3, Jeremy Orloff and Jonathan Bloom

Conditional Probability

MATH 3C: MIDTERM 1 REVIEW. 1. Counting

CISC 1100/1400 Structures of Comp. Sci./Discrete Structures Chapter 7 Probability. Outline. Terminology and background. Arthur G.

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Term Definition Example Random Phenomena

Prof. Thistleton MAT 505 Introduction to Probability Lecture 18

Probability deals with modeling of random phenomena (phenomena or experiments whose outcomes may vary)

Notation: X = random variable; x = particular value; P(X = x) denotes probability that X equals the value x.

SDS 321: Introduction to Probability and Statistics

PERMUTATIONS, COMBINATIONS AND DISCRETE PROBABILITY

Lecture Notes 1 Basic Probability. Elements of Probability. Conditional probability. Sequential Calculation of Probability

Statistics for Engineers

Lecture 8: Conditional probability I: definition, independence, the tree method, sampling, chain rule for independent events

Notes 12 Autumn 2005

Chapter 1 Review of Equations and Inequalities

Probability Theory. Introduction to Probability Theory. Principles of Counting Examples. Principles of Counting. Probability spaces.

the time it takes until a radioactive substance undergoes a decay

Notes on Mathematics Groups

Take the Anxiety Out of Word Problems

STATISTICS 1 REVISION NOTES

Discrete Probability Distribution

Probability Distributions for Discrete RV

Chapter 8: An Introduction to Probability and Statistics

STA Module 4 Probability Concepts. Rev.F08 1

1 Normal Distribution.

Lecture 1 : The Mathematical Theory of Probability

STAT/SOC/CSSS 221 Statistical Concepts and Methods for the Social Sciences. Random Variables

Solutionbank S1 Edexcel AS and A Level Modular Mathematics

Lecture 2. Constructing Probability Spaces

Outline. 1. Define likelihood 2. Interpretations of likelihoods 3. Likelihood plots 4. Maximum likelihood 5. Likelihood ratio benchmarks

Events A and B are said to be independent if the occurrence of A does not affect the probability of B.

CS 361: Probability & Statistics

P (E) = P (A 1 )P (A 2 )... P (A n ).

Lecture 6 Random Variable. Compose of procedure & observation. From observation, we get outcomes

LECTURE NOTES by DR. J.S.V.R. KRISHNA PRASAD

6.041SC Probabilistic Systems Analysis and Applied Probability, Fall 2013 Transcript Tutorial:A Random Number of Coin Flips

AP Calculus AB Summer Assignment

2. Conditional Probability

Hi, my name is Dr. Ann Weaver of Argosy University. This WebEx is about something in statistics called z-

Math 1313 Experiments, Events and Sample Spaces

First Digit Tally Marks Final Count

Lecture 10: Probability distributions TUESDAY, FEBRUARY 19, 2019

Notes 1 Autumn Sample space, events. S is the number of elements in the set S.)

Part (A): Review of Probability [Statistics I revision]

Probability (Devore Chapter Two)

Chapter 13, Probability from Applied Finite Mathematics by Rupinder Sekhon was developed by OpenStax College, licensed by Rice University, and is

Toss 1. Fig.1. 2 Heads 2 Tails Heads/Tails (H, H) (T, T) (H, T) Fig.2

Intro to Information Theory

CS 361: Probability & Statistics

IAM 530 ELEMENTS OF PROBABILITY AND STATISTICS LECTURE 3-RANDOM VARIABLES

Class 26: review for final exam 18.05, Spring 2014

V. RANDOM VARIABLES, PROBABILITY DISTRIBUTIONS, EXPECTED VALUE

Quantitative Methods for Decision Making

Intermediate Math Circles November 8, 2017 Probability II

4/17/2012. NE ( ) # of ways an event can happen NS ( ) # of events in the sample space

CIS 2033 Lecture 5, Fall

Probability (10A) Young Won Lim 6/12/17

Applied Statistics I

Chapter 2 PROBABILITY SAMPLE SPACE

Discrete Mathematics and Probability Theory Fall 2012 Vazirani Note 14. Random Variables: Distribution and Expectation

Tutorial for Lecture Course on Modelling and System Identification (MSI) Albert-Ludwigs-Universität Freiburg Winter Term

11. Probability Sample Spaces and Probability

Probability and Independence Terri Bittner, Ph.D.

Chapter 5. Piece of Wisdom #2: A statistician drowned crossing a stream with an average depth of 6 inches. (Anonymous)

Lecture 1: Probability Fundamentals

Conditional Probability

Expected Value 7/7/2006

Sec$on Summary. Assigning Probabilities Probabilities of Complements and Unions of Events Conditional Probability

To factor an expression means to write it as a product of factors instead of a sum of terms. The expression 3x

Chapter 18. Sampling Distribution Models /51

Introduction Probability. Math 141. Introduction to Probability and Statistics. Albyn Jones

k P (X = k)

Chapter 1 Probability Theory

Chapter 4: An Introduction to Probability and Statistics

CS 441 Discrete Mathematics for CS Lecture 20. Probabilities. CS 441 Discrete mathematics for CS. Probabilities

Transcription:

Maths Notes : Discrete Random Variables Version. Steve Smith Tuition: Maths Notes e iπ + = 0 a + b = c z n+ = z n + c V E + F = Discrete Random Variables Contents Intro The Distribution of Probabilities for a Discrete Random Variable. Eamples............................................ Eample........................................ Answer........................................ Eample........................................ Answer........................................ Eample...................................... 0.. Answer...................................... 0..7 Eample........................................ Answer........................................9 Eample...................................... 7..0 Answer...................................... 7 Epectation and Variance 9. The Definition of Epectation............................... 9.. Epectation Eample: Rolling A Die....................... 9.. Another Eample of Calculating an Epectation................. 0. The Definition of Variance................................... Variance Eample: Rolling A Die........................... Another Eample of Calculating a Variance................... A Sigma ( ) Notation B An Alternative Formula For the Variance Prerequisites None.

Maths Notes : Discrete Random Variables Version. Notes None. Document History Date Version Comments th November 0.0 Initial creation of the document. th November 0. A few minor tune-ups.

Maths Notes : Discrete Random Variables Version. 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 everyday life. In Maths, Discrete means that only certain values of the variable are allowed. The opposite of Discrete is Continuous which means that any value is allowed. Eamples of discrete variables are () the value you get when you roll a dice and () the card you get when you pick one from a pack. Eamples of continuous variables are () the height of someone in your class at school, and () the length of a piece of string. Random : this means that you can never predict what the outcome of the variable will be.

Maths Notes : Discrete Random Variables Version. 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 the best we can do is to work out probablilities of results. Usually, probabilities of DRVs are shown in a table, like this Result P robability This table shows the probabilities of getting each possible result when you roll a fair die. In these tables, the top row shows the values that can result when you carry out your eperiment (in this case, rolling the die). The bottom row shows the probability of getting each of those values. When you roll a fair die, each of the possible results can come up, and they are all equally likely to occur. So the probability of each is. Notice that if you add up all the probabilities you get. This makes sense: when you roll a die, you must get one of the values, and you can t get two different values with one roll (so there is no overlap of results). This is a very important fact about DRVs: the sum of the probabilities has to be. Important Point!! The sum of the probabilities for a DRV is Normally, the above table is written like this: p(x = ) And this is because there is a bit of notation that you need to understand. The DRV itself is usually denoted by an upper-case letter, X in this case. So X represents the action of rolling this die. Lower-

Maths Notes : Discrete Random Variables Version. case letters ( in this case, if the DRV is X) denote the values that X can take. In this eample, then, our DRV is X and the values that it can take () are,,,,, or. The epression p(x = ) means the probability that the DRV X can take the value. So in our case, for eample, p(x = ) =, and p(x > ) =. Can you see that? That s because p(x > ) would mean the probability of getting a value greater than. There are only two possibilities of this: or, each having a probability of of coming up. Hence the probability p(x > ) will be + =. These tables are called probability distribution tables, because they show how the total probability (which is, of course) is distributed between the various possible results.

Maths Notes : Discrete Random Variables Version.. Eamples.. Eample 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 > ) (b) p(x is even) (c) p( X 7 < ).. Answer (i) The easiest way to visualise the outcomes from this random variable is to draw a table of all the possible results of throwing these two dice. Here s my attempt: F irst die roll Second die roll 7 7 7 9 7 9 0 7 9 0 7 9 0 Each entry in the table is just the values on the two dice added together. Now in order to produce a probability distribution, we have to figure out all the possible values of our random variable, and then 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,,,...,,. p(x = ) 7 9 0

Maths Notes : Discrete Random Variables Version. (ii) Here s a picture of the distribution: 7 9 0 The distribution is symmetric. It reaches a peak in the middle (p(x = 7) = ), and it goes down in the same way on either side of = 7. (iii) (a) p(x > ) will be the probability of getting the sum on the dice to be greater than : i.e. 9, 0, or. If you add up the probabilities of getting those values, you get + + + = 0 =. (iii) (b) p(x is even) will be the probability of getting the sum on the dice to be,,, 0 or. If you add up the probabilities of getting those values, you get + + + + + = =. (iii) (c) To get the probability of p( X 7 < ) we need to first understand what X 7 means. The modulus signs (the vertical lines) around something say something very simple: make me positive. So, for eample, is just, but is as well. I think we need another little table: 7 9 0 7 0 7 0 This table lists all the values can take (on the top row), then for those values of what the corresponding value of 7 would be (the middle row), and finally the values of 7 for each (in the third row). So the only values 7 can take are 0,,,, and. And we want this value to be less than. So the probability of getting a result that corresponds to a value of 7 < would be p(x = ) + p(x = ) + p(x = 7) + p(x = ) + p(x = 9) = + + + + = =. 7

Maths Notes : Discrete Random Variables Version... Eample The random variable Y is given by the absolute difference between the scores when two ordinary dice are 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 < ) (b) p(y is odd).. Answer (i) The easiest way to visualise this random variable is to draw a table of all the possible results of throwing these dice. The phrase the absolute difference means subtract one value from the other, then make it positive. Here s my table: F irst die roll Second die roll 0 0 0 0 0 0 Each entry in the table is just the value on one of the two dice subtracted from the other, then made positive. Now in order to produce a probability distribution, we have to figure out all the possible values of our random variable, and then 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 0,,,,, and. y p(y = y) 0 0

Maths Notes : Discrete Random Variables Version. (ii) Here s a picture of the distribution: 0 0 The distribution is said to have positive skew. That means that the peak is to the left of the middle. (iii) (a) p(y < ) will be the probability of getting the difference between the dice to be less than : i.e. 0,, or. If you add up the probabilities of getting those values, you get + 0 + = =. (iii) (b) p(y is odd) will be the probability of getting the difference between the dice to be,, or. If you add up the probabilities of getting those values, you get 0 + + = =. 9

Maths Notes : Discrete Random Variables Version... Eample The probability distribution for a discrete random variable X is given by: p(x = ) = k p(x = ) = 0 for =,,, otherwise (i) Find the value of k and tabulate the probability distribution. (ii) If two successive values of X are generated independently, find the probability that: (a) the two values are equal; (b) the first value is greater than the second value... Answer (i) In order to find the value of k I think the easiest thing to do would be to tabulate the probability distribution, even though we don t know what k is yet. To do that, we have to put our probabilities in terms of k, but that s allowed! Here s my table: p(x = ) k k k k I calculated these probabilities from the probability distribution: the entry for X =, for eample is k k because in the formula, when =, then p(x = ) =. Now, because this is a probability distribution, then the sum of the probabilities must be. So: = k + k + k + k k + k + k + k = = 0k In which case, 0k = = k = 0 = = 0. 0

Maths Notes : Discrete Random Variables Version. Now, if we write out our probability distribution table again, this time incorporating the value of k that we have just discovered, then it turns out to be: p(x = ) 0. 0. 0. 0. because, for eample, when k = 0., then p(x = ) = k = 0. =. = 0.. (ii) When you have successive events occurring and you want to find the probabilities of combinations of events occurring, then the best thing to do is to draw a tree diagram: First Value of X Second Value of X 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. Key: Branch value 0. 0. 0. 0. 0. 0. Branch probability 0. 0. 0. 0. 0. Now if we want the two values of X to be equal, then the tree diagram we need to draw emphasises those outcomes where the first value of X is equal to the second value of X. In the following diagram, those branches and outcomes are marked in green: Now we need to find the probability of any of those green outcomes occurring. Remember how to do this? We simply multiply the probabilities of the branches to get the probability of the final outcome, so:

Maths Notes : Discrete Random Variables Version. First Value of X Second Value of X 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. Key: Branch value 0. 0. 0. Branch probability 0. 0. 0. 0. 0. p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.0 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.0 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.09 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0. But we want any of these situations: so we just add up the probabilities of the events we want: p(first X = second X) = 0.0 + 0.0 + 0.09 + 0. = 0.

Maths Notes : Discrete Random Variables Version. (ii) Now if we want the first value of X to be greater than the second value of X, then the tree diagram we need to draw emphasises those outcomes where the first value of X is greater than the second value of X. In the following diagram, those branches and outcomes are marked in green: First Value of X Second Value of X 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. Key: Branch value 0. 0. 0. 0. 0. 0. Branch probability 0. 0. 0. 0. 0. Again we need to find the probability of any of those green outcomes occurring. Remember how to do this? We simply multiply the probabilities of the branches to get the probability of the final outcome, so: p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.0 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.0 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.0 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.0 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0.0 p(the first value of X is AND the second value of X is ) is: 0. 0. = 0. But we want any of these situations: so we just add up the probabilities of the events we want: p(first X > second X) = 0.0 + 0.0 + 0.0 + 0.0 + 0.0 + 0. = 0.

Maths Notes : Discrete Random Variables Version...7 Eample A curiously shaped si-faced die produces scores, X, for which the probability distribution is given by: p(x = ) = k p(x = ) = 0 for =,,,,, otherwise (i) Find the value of k and illustrate the probability distribution. (ii) Show that, when this die is thrown twice, the probability of obtaining two equal scores is very nearly... Answer (i) In order to find the value of k I think the easiest thing to do would be to tabulate the probability distribution, even though we don t know what k is yet. To do that, we have to put our probabilities in terms of k, but that s allowed! Here s my table: p(x = ) k k k k k k I calculated these probabilities from the probability distribution: the entry for X =, for eample is k because in the formula, when =, then p(x = ) = k. Now, because this is a probability distribution, then the sum of the probabilities must be. So: = k + k + k + k + k + k ( = k + + + + + ) ( 0 = k 0 + 0 0 + 0 0 + 0 + 0 + 0 ) 0 ( ) 7 = k 0 In which case, 0 = 7k = k = 0 7 = 0 9

Maths Notes : Discrete Random Variables Version. Now, if we write out our probability distribution table again, this time incorporating the value of k that we have just discovered, then it turns out to be: p(x = ) 0 7 0 7 0 7 7 7 0 7 because, for eample, when k = 0 0, then p(x = ) = = 0. 7 7 7 Here s a picture of the distribution: 0 7 0 7 0 7 0 7 0 7 0 7 (ii) For this part of the question, I would normally want to draw a tree diagram of all the possibilites when the die is thrown twice. But because there are so many ( = ), instead I m only going to show part of it: First Value of X Second Value of X 0 7 Key: 0 7 Branch value Branch probability 0 7 0 7 0 7 The only bits I ve drawn are the the branches and outcomes of the first two cases of the values of X being equal. Now to work out the probabilities of the outcomes, we have to multiply the probabilities of the relevant branches, so: p(the first value of X = AND the second value of X = ) = 0 0 = 00 ; 7 7 09 p(the first value of X = AND the second value of X = ) = 0 0 = 900 etc. 7 7 09 And we have to do this for all si outcomes where the the two values of X are the same. summarised the results in the following table: I ve

Maths Notes : Discrete Random Variables Version. Second die roll F irst die roll 00 09 900 09 00 09 09 09 00 09 where I have only put in the values that I am interested in (where the two values of X are the same). So, to find the total probability of the first die roll being equal to the second die roll, then we just add up all these probabilities: 00 + 900 + 00 + + + 00 = 9 09 09 09 09 09 09 09 = 0. (to sf). Which is about a quarter.

Maths Notes : Discrete Random Variables Version...9 Eample Three fair coins are tossed. (i) By considering the set of possible outcomes, tabulate the probability distribution of X, the number of heads occurring. (ii) Illustrate the distribution, and describe its shape. (iii) Find the probability that there are more heads than tails. (iv) Without further calculation, state whether your answer to part (iii) would be the same if four fair heads were tossed. Give a reason for your answer...0 Answer (i) Well, I think another tree diagram is in order: First Value of X Second Value of X Third Value of X H HHH H T HHT H T H T HTH HTT H THH T H T THT T H T TTH TTT Key: Branch Value Branch probability And because each branch has a probability of associated with it, then each outcome will have a probability of =. So, in order to compile our distribution table, we just add up all the probabilities for a given number of heads. Looking at the possible outcomes, we could have no heads, head, heads or heads, so: p(x = ) 0 where, for eample, the probability of getting heads is since there are three outcomes, each having a probability of, of getting heads (HHT, HTH, THH). 7

Maths Notes : Discrete Random Variables Version. (ii) A picture of the distribution is: The distribution is clearly symmetric. 0 (iii) For the probability of getting more heads than tails, we look for the outcomes that give us more heads than tails. I ve marked the outcomes with green dots, and highlighted the probabilities: First Value of X Second Value of X Third Value of X H HHH H T HHT H T H T HTH HTT H THH T H T THT T H T TTH TTT Key: Branch Value Branch probability So the probability of getting more heads than tails will be + + + = =. (iii) I don t think the answer would be the same if we had four tosses. My reasoning goes like this: with an odd number of tosses, then you can never have the same number of heads and tails. So you will either have more heads than tails, or more tails than heads. Since it is equally likely to get a head or a tail on each toss, then the probability of getting either more heads than tails or more tails than heads must be the same. This can only happen if those probabilities are each. However, if you have an even number of tosses, then there must be some probability of getting the same number of heads as tails. Since, as before, the probability of getting more heads than tails, or more tails than heads will still be the same, then those probabilities must be less than if you have an even number of tosses.

Maths Notes : Discrete Random Variables Version. Epectation and Variance Now you ve probably come across the idea that a set of data can have a mean (an estimate of a typical value of the data in your set) and a standard deviation (an estimate of how widely your data is spread out). Well, you can have the same things with probability distributions. With probability distributions, the typical-value-thing is called the Epectation, and the spread-measure-thing is called thevariance. The variance is just the square of the standard deviation, actually. In fact, you can think of a discrete random variable as a means of generating a set of data. Each time you roll a die, for eample, you are generating a piece of data that you can turn into a set. The set might look like this:,,,,,,,,... and of course when we have finished generating our set of data, then we could work out the mean and the standard deviation of it, just like we could with any other set of data.. The Definition of Epectation Well, to start with, E(X) is the shorthand for the epected value (i.e. the epectation) of the DRV X. Now we know this, we can be told about the formula for calculating it: E(X) = i p(x = i ) i= Now what on Earth does that mean? If you need a refresher on this kind of notation, check out Appendi A. Assuming you re OK with the notation, then what this formula tells us is that to calculate the epected value of a DRV (another way of putting this would be: the mean of values generated by that DRV ) what you do is to multiply all the possible values of the DRV by the probability of that value occurring, then add up (that s the bit) all of those products. It sounds harder than it actually is. Check out these eamples... Epectation Eample: Rolling A Die Let s take the eample of the die. You can only get values of,,,, or when you roll a die. And (assuming it is a fair die) each of the si values is equally likely to come up on any given roll. So in this case, we could work out an estimate of the average roll like this. Let s say we rolled this die 000 times. Because this is a lot of rolls, then we would epect to get roughly 000 of each number come up. We won t get eactly 000 of each number, but the more rolls we do, the closer we get to having of them being s, etc. So let s assume for the moment that we did have eactly 000 s, 000 s, etc. How could we calculate the mean? Well, we d have to add up all the values, and divide by 000. But how do we add up the values? Have you thought of a way of doing this? What we could do is this: if we have 000 s, then they will add up to 000 = 000; if we have 000 s, then they will add up to 000 = 000, etc. So we could calculate our mean as: mean of dice rolls = 000 + 000 + 000 + 000 + 000 + 000 000 9 =.

Maths Notes : Discrete Random Variables Version. Which seems entirely reasonable when you think about it:. is eactly in the middle of the set of numbers,,,, and! OK. Now let s check out our formula for calculating the Epectation of this DRV. The formula is: E(X) = i p(x = i ) i= And the best way to do these calculations is to draw up a probability distribution table, like we ve done before, but this time with an etra row in it, representing the products that we will get: p(x = ) p(x = ) + + + + + So this is how the Epectation calculation works: multiply each value by it s probabilty p(x = ). Then add up all the products: E(X) = + + + + + = + + + + + = =. And the result is the same as we had before. This gives us a good feeling that the Epectation of the DRV is equivalent to the mean of data generated by it. Let s have a look at another eample... Another Eample of Calculating an Epectation Let s say we had a DRV described by the following probability distribution: 0 p(x = ) 0. 0. 0. 0. Then proceeding as before, we multiply each value by the probability of the value p(x = ) and put that result in a new row of our table: 0

Maths Notes : Discrete Random Variables Version. p(x = ) p(x = ) 0 0. 0. 0. 0. + + + 0.0 0. 0. 0.. Then we add up all the products, and get the answer of : E(X) = 0 0. + 0. + 0. + 0. = 0.0 + 0. + 0. + 0. =. So for this DRV, if we took lots of values of the DRV and found the mean of those values, we d get.. This again seems about right to me, since. is roughly in the middle of the values 0,, and.. The Definition of Variance Variance is defined in a similar way to Epectation, in that it is defined in terms of the notation. It s just a bit more complicated: { i=n } V ar(x) = i p(x = i ) {E(X)} i= Actually the bit is very similar to the Epectation: the only difference is that we ve got an instead of an. And there s a new bit at the end: once we ve done the calculations, we have to subtract the square of the Epectation from the result! Phew! That means we have to calculate the Epectation before we can calculate the Variance, as the Epectation is used in the calculation of Variance. Let s see what we d get then if we used this definition on the two eamples we ve just calculated the Epectation for... Variance Eample: Rolling A Die Let s check out our formula for calculating the Variance of this DRV. The formula is: { i=n } V ar(x) = i p(x = i ) {E(X)} We ve already calculated the Epectation E(X) for this DRV: it s.. i= And the best way to calculate the bit is to draw up a probability distribution table, like we ve done before, but this time with etra rows in it:

Maths Notes : Discrete Random Variables Version. p(x = ) p(x = ) 9 + + + + + 9 9 This time we need two etra rows: one for the values, and then the other for the products. And this is how the Variance calculation works: multiply each value by the probabilty p(x = ). Then add up all the products. And don t forget we have to subtract the square of the Epectation at the end as well: V ar(x) = + + 9 + + +. = + + 9 + + +. = 9. =.97 (to sf) Remember that I said that the Variance is the square of the Standard Deviation? Then the Standard Deviation measure for rolling a fair die would be 9 SD(X) =. =.70 (to sf) This is the number that gives you an idea of the typical distance a value is from the mean of the DRV... Another Eample of Calculating a Variance Let s say we had the same DRV described by the probability distribution that we saw a bit earlier: 0 p(x = ) 0. 0. 0. 0. Then proceeding as before, we multiply each value by the probability of the value p(x = ) and put that result in a new row of our table:

Maths Notes : Discrete Random Variables Version. 0 p(x = ) p(x = ) 0. 0. 0. 0. 0 9 + + + 0.0 0.. 0.9. Remembering that the Epectation of this DRV was., then the Variance is calculated by: V ar(x) = 0 0. + 0. + 0. + 9 0.. = 0.0 + 0. +. + 0.9. =..9 = 0. So for this DRV, if we took lots of values of the DRV and found the Variance of those values, we d get 0.. At this point, you should check out Appendi B, where I show you something interesting!

Maths Notes : Discrete Random Variables Version. A Sigma ( ) Notation Often in science and mathematics, you ll come across the notation. A typical eample is this kind of thing: E(X) = i p(x = i ) i= So what does this mean? Well, the notation just represents a lot of things added together. OK, but what things? And how many? Well in this eample, below the sign we have i =. i is a count variable (that could have any name: here I ve called it i, but you can use any letter you like) that s used to show how many things we are going to add together. In this case, the count starts at. Above the we have i = n. That tells us that the count stops at n. What s n? In statistics, n is most often used to denote how many items there are in our set of data. So, translated into English, i= simply means add together the following set of n things.... Right. But what is it that we are going to add together? Well, in this situation, the bit after the sign is i p(x = i ) so what s that all about? If you ignore the i for a moment, and remember that we are dealing here with DRVs, you should be able to twig that represents a value that the DRV can take, and p(x = ) is the probability of that value turning up when the DRV is actioned. But what about the i? Remember that it is a count variable: it counts through each item in the set of things you are adding up. So what i p(x = i ) i= means is for each value X can take, multiply that value by the probability of that value turning up. Add all those products together. E.g. when a die is rolled, or a coin tossed. A product is what mathematicians call two things multiplied together.

Maths Notes : Discrete Random Variables Version. B An Alternative Formula For the Variance Check this out. I want to figure out what E [ (X µ) ] is. This is the Epectation of X µ. Using the definition of Epectation, this will be E [ (X µ) ] = ( i µ) p(x = i ) Now if you think about it, we could multiply out those brackets within the, and get this: E [ (X µ) ] = = = = i= ( i µ) p(x = i ) i= i=n ( i i µ + µ ) p(x = i ) i= i=n i p(x = i ) + i µ p(x = i ) + µ p(x = i ) i= i=n i= i=n i p(x = i ) µ i p(x = i ) + µ p(x = i ) i= since µ is just a constant, so we can take it outside the s. But the middle term in the above equation is just µe(x) from the definition of E(X), and the third term is just µ because the sum of the probabilities of a DRV add up to!! So: E [ (X µ) ] = = i= i p(x = i ) µ i p(x = i ) + µ p(x = i ) i= i=n i= i p(x = i ) µe(x) + µ i= So far, I haven t said anything about this µ. It could be anything. What if I made it equal to µ = E(X)? What would we have then? Let s see: E [ (X µ) ] = = = = i p(x = i ) µe(x) + µ i= i=n i= i= i= i p(x = i ) E(X)E(X) + [E(X)] i= i=n i p(x = i ) [E(X)] + [E(X)] i= i=n i p(x = i ) [E(X)] i= = V ar(x)

Maths Notes : Discrete Random Variables Version. Wow!! That means that we have two ways of working out the Variance of a DRV. They are: { i=n } V ar(x) = i p(x = i ) {E(X)} = E(X ) [E(X)] i= which is the typical definition, and also V ar(x) = E[(X E(X)) ] Two Ways To Calculate Variance: V ar(x) = E(X ) [E(X)] V ar(x) = E[(X E(X)) ]