Chapter 3: Discrete Random Variables and Probability Distributions Flashcards
Random Variables
- For a given sample space S of some experiment, a random variable (rv) is any rule that associates a number with each outcome in S
- In mathematical language, a random variable is a function whose domain is the sample space and whose range is the set of real numbers.
- variable because different numerical values are possible
- random because the observed value depends on which of the possible experimental outcomes results
How are Random Variables denoted?
- customarily denoted by uppercase letters, such as X and Y, near the end of the alphabet
- The notation X (s) = x means that x is the value associated with the outcome s by the random variable X
What are the 2 types of Random Variables?
- Discrete
- Continuous
Discrete Random Variables
- A random variable that can only assume distinct values is said to be discrete. Usually these represent a count.
What is a Bernoulli Experiment?
- A discrete random variable
- A Bernoulli experiment provides a 0/1 response
What is a Binomial Random Variable?
- A discrete random variable
- A binomial rv gives the number of successes in n independent, identical trials. Possible values are 0, 1, …, n
What is a Geometric variable?
- A discrete random variable
- Number of objects tested until a success. Possible values are 1, 2, 3, …
Continous Random Variables
- a random variable that can (theoretically) assume any value in a finite or infinite interval is said to be continous
Discrete RV for Toin Coss Experiment
- When we toss a coin four times, we can record the outcome as a string of heads and tails, such as HTTH.
- However we are most often interested in numerical outcomes such as the count of heads in the four tosses.
- It is convenient to use the following shorthand notation
- Let X be the number of heads.
- We call X a random variable because its values vary when the coin tossing is repeated
- If our outcome is HTTH, then X = 2, if the next outcome is TTTH, the value of X changes to 1.
- The possible values of X are 0, 1, 2, 3, 4.
- Tossing a coin four times will give X one of these possible values.
- The probability that the random variable X will equal x is: P(X = x) or simply p(x).
- The probability that we observe exactly 2 heads in a single toss of 3-coins is denoted by P(X=2) (Note: P(X=2)=3/8)
Example 1 - Bernoulli rv (a specific kind of discrete rv)
•When a student calls a university help desk for technical support, he/she will either immediately be able to speak to someone (S, for success) or will be placed on hold
(F, for failure).
With S = {S, F}, define a rv X by
X (S) = 1 X (F) = 0
•The rv X indicates whether (1) or not (0) the student can immediately speak to someone.
Example 6
- As another example, suppose we select married couples at random and do a blood test on each person until we find a husband and wife who both have the same Rh factor.
- With X = the number of blood tests to be performed, possible values of X are D = {2, 4, 6, 8, …}.
- Since the possible values have been listed in sequence, X is a discrete rv.
Probability Distributions for Discrete Random Variables
- Probabilities assigned to various outcomes in S in turn determine probabilities associated with the values of any particular rv X.
- The probability distribution of X says how the total probability of 1 is distributed among the various possible X values.
- Suppose, for example, that a business has just purchased four laser printers, and let X be the number among these that require service during the warranty period.
- Possible X values are then 0, 1, 2, 3, and 4. The probability distribution will tell us how the probability of 1 is subdivided among these five possible values— how much probability is associated with the X value 0, how much is apportioned to the X value 1, and so on.
- We will use the following notation for the probabilities in the distribution:
p (0) = the probability of the X value 0 = P(X = 0)
p (1) = the probability of the X value 1 = P(X = 1)
* In general, p (x) will denote the probability assigned to the value x.
Example: Four Coin Tosses
Toss a balanced coin four times; the discrete random variable X counts the number of heads. How do we find the probability distribution function of X?
- The outcome of four tosses is a sequence of heads and tails such as HTTH and there are 16 possible outcomes.
P(X=0) = 1/16 = .0625
P(X=1) = 4/16 = 0.25
P(X=2) = 6/16 = .375
P(X=3) = 4/16 = .25
P(X=4) = 1/16 = .0625
- The sum of these probabilities =1, so this is a legitimate probability distribution function.
- In the table form, the probability distribution for the rv X is:
Number of heads X: 0 1 2 3 4
Probability (X=x):.0625 0.25 0.375 0.25 0.0625
Probability Mass Function (pmf)
- a discrete distribution is described by giving its probability mass function, or pmf, either as a table or as a function.
- Note: In first bullet, change “all x () W” to “all s () S”
Example 7
- The Cal Poly Department of Statistics has a lab with six computers reserved for statistics majors.
- Let X denote the number of these computers that are in use at a particular time of day.
- Suppose that the probability distribution of X is as given in the following table; the first row of the table lists the possible X values and the second row gives the probability of each such value.
•We can now use elementary probability properties to calculate other probabilities of interest. For example, the probability that at most 2 computers are in use is
P(X <= 2) = P(X = 0 or 1 or 2)
= p(0) + p(1) + p(2)
= .05 + .10 + .15
= .30
•Since the event at least 3 computers are in use is complementary to at most 2 computers are in use,
P(X >= 3) = 1 – P(X <= 2)
= 1 – .30
= .70
which can, of course, also be obtained by adding together probabilities for the values, 3, 4, 5, and 6.
•The probability that between 2 and 5 computers inclusive are in use is
P(2 <= X <= 5) = P(X = 2, 3, 4, or 5)
= .15 + .25 + .20 + .15
= .75
whereas the probability that the number of computers in use is strictly between 2 and 5 is
P(2 < X < 5) = P(X = 3 or 4)
= .25 + .20
= .45
Special Discrete Random Variables: Bernoulli random variables
- Consider the experiment of recording the school year of the 1st student that walks into this class.
- Define a rv Y by
- Y = 1 if the 1st student to walk in is a 1st-year student
- Y = 0 if the 1st student is not a 1st-year student (ie all other types of students)
Such random variables arise frequently enough that they have been given a name-Bernoulli ( after the person who first studied this rv)
•Any random variable whose only possible values are 0 and 1 is called a Bernoulli random variable
1st-year Student Example: Bernoulli random variable
- Let’s say we conduct this experiment for a month, where: Y=1 if the 1st student to walk in is a 1st-year student; Y=0 if the 1st student is not a 1st-year student
- Let’s say we find that 60% of the time, the 1st student walking in was a 1st-year student. Then we have:
- p(1)=P(Y=1)=0.60
- p(0)=P(Y=0)=0.40
- p(Y=y)=0 for all y≠ 0 or y≠ 1
- A typical and equivalent representation for the pmf of a Bernoulli rv is:
- p(y) =0.4 if y=0
- =0.6 if y=1
- =0 otherwise