RANDOM VARIABLES Random variables Probability distribution Random number
RANDOM VARIABLES • Random variables • Probability distribution • Random number generation – Expected value – Variance – Probability distributions 1
RANDOM VARIABLES • Random variable: – A variable whose numerical value is determined by the outcome of a random experiment • Discrete random variable – A discrete random variable has a countable number of possible values. – Example • Number of heads in an experiment with 10 coins • If X denotes the number of heads in an experiment with 10 coins, then X can take a a value of 0, 1, 2, …, 10 2
RANDOM VARIABLES – Other examples of discrete random variable: number of defective items in a production batch of 100, number of customers arriving in a bank in every 15 minute, number of calls received in an hour, etc. • Continuous random variable – A continuous random variable can assume an uncountable number of values. – Examples • The time between two customers arriving in a bank, the time required by a teller to serve a customer, etc. 3
DISCRETE PROBABILITY DSTRIBUTION • Discrete probability distribution – A table, formula, or graph that lists all possible events and probabilities a discrete random variable can assume – An example is shown below: Discrete Probability Distribution Probability 0. 75 0. 25 0 HH HT Event TT 4
CONTINUOUS PROBABILITY DSTRIBUTION • Continuous probability distribution – Similar to discrete probability distribution – Since there are uncountable number of events, all the events cannot be specified – Probability that a continuous random variable will assume a particular value is zero!! – However, the probability that the continuous random variable will assume a value within a certain specified range, is not necessarily zero – A continuous probability distribution gives probability values for a range of values that the continuous random variable may assume 5
f(x) CONTINUOUS PROBABILITY DSTRIBUTION z 6
f(x) CONTINUOUS PROBABILITY DSTRIBUTION z 7
REVISIT SIMPLE RANDOM SAMPLING • In Chapter 5, a simple random sample of 10 families is chosen from a group of 40 families. – 40 Random numbers are generated – Each random number is between 0 and 1 (not including 1) – Excel RAND() function is used to generate each random number. 8
REVISIT SIMPLE RANDOM SAMPLING – What is the average of the random numbers generated? – What is the variance of the random numbers generated? – What is the standard deviation of the random numbers generated? 9
REVISIT SIMPLE RANDOM SAMPLING – Plot a histogram with all the random numbers, and comment on the distribution of the random numbers. 10
RANDOM NUMBER GENERATION • Most software can generate discrete and continuous random numbers (these random numbers are more precisely called pseudo random numbers) with a wide variety of distributions • Inputs specified for generation of random numbers: – Distribution – Average – Variance/standard deviation – Minimum number, mode, maximum number, etc. 11
RANDOM NUMBER GENERATION • Next 4 slides – show histograms of random numbers generated and corresponding input specification. – observe that the actual distribution are similar to but not exactly the same as the distribution desired, such imperfections are expected – methods/commands used to generate random numbers will not be discussed in this course 12
RANDOM NUMBER GENERATION: EXAMPLE – A histogram of random numbers: uniform distribution, min = 500 and max = 800 25 20 15 10 5 0 50 0 52 0 54 0 56 0 58 0 60 0 62 0 64 0 66 0 68 0 70 0 72 0 74 0 76 0 78 0 80 0 Frequency Uniform Distribution Random Numbers 13
RANDOM NUMBER GENERATION: EXAMPLE – A histogram of random numbers: triangular distribution, min = 3. 2, mode = 4. 2, and max = 5. 2 14
RANDOM NUMBER GENERATION: EXAMPLE – A histogram of random numbers: normal distribution, mean = 650 and standard deviation = 100 15
RANDOM NUMBER GENERATION: EXAMPLE – A histogram of random numbers: exponential distribution, mean = 20 16
- Slides: 16