Discrete Random Variables and Probability Distributions Notes

Random Variables

  • A random or chance experiment involves randomly selecting a family.
  • X denotes the number of vehicles owned by the selected family.
  • The value assumed by X depends on the outcome of a random experiment.
  • X is called a random variable or chance variable.

Random Variables Definition

  • A function that assigns numerical values to the outcomes of an experiment.
  • Denoted by uppercase letters (e.g., X).
  • Values of the random variable are denoted by corresponding lowercase letters (e.g., x1, x2, x3, …).

Discrete and Continuous Random Variables

  • Random Variable: A variable whose value is determined by the outcome of a random experiment.
  • Discrete Random Variable: A random variable that assumes countable values.
    • Examples:
      • The number of cars sold at a dealership during a given month.
      • The number of people coming to a theater on a certain day.
      • The number of complaints received at the office on a given day.
  • Continuous Random Variable: A random variable that assumes any value contained in one or more intervals.
    • Examples:
      • The height of a person.
      • The time taken to complete the exam.
      • The price of a house.

Probability Distributions for Discrete Random Variables

  • Let X be a discrete random variable and x be one of its possible values.
  • The probability that random variable X takes a specific value x is denoted as P(X=x)P(X = x)
  • The probability distribution function of a random variable is a representation of the probabilities for all the possible outcomes.
  • The Probability Distribution of a Discrete Random Variable lists all the possible values that the random variable can assume and their corresponding probabilities.
  • The probability distribution can be presented as a mathematical formula, a table, or a graph.

Experiment Example: Rolling a Die

  • Let X = # dots.
  • P(X=x)={16amp;if x=1,2,3,4,5,6 0amp;otherwiseP(X = x) = \begin{cases} \frac{1}{6} & \text{if } x = 1, 2, 3, 4, 5, 6 \ 0 & \text{otherwise} \end{cases}
  • This is a uniform distribution because the bar heights are all the same.

Experiment Example: Tossing Two Coins

  • Let X = # heads.
  • Possible outcomes: TT, HH, HT, TH
  • Probability Distribution:
    • X = 0: P(X=0)=1/4=0.25P(X=0) = 1/4 = 0.25
    • X = 1: P(X=1)=2/4=0.50P(X=1) = 2/4 = 0.50
    • X = 2: P(X=2)=1/4=0.25P(X=2) = 1/4 = 0.25
  • Show P(x), i.e., P(X=x)P(X = x), for all values of x.
  • This is a bell-shaped distribution.

Table: Probability Distribution of the Number of Vehicles

  • This is a bell-shaped distribution.
  • Total: P(x)=1.000\sum P(x) = 1.000

Probability Distribution Required Properties

  • 0P(x)10 \leq P(x) \leq 1 for any value of x
  • P(x)=1\sum P(x) = 1 (The individual probabilities sum to 1; summation over all possible x values)

Cumulative Probability Function

  • The cumulative probability function, denoted F(x<em>0)F(x<em>0), shows the probability that X does not exceed the value x</em>0x</em>0
    • F(x<em>0)=P(Xx</em>0)F(x<em>0) = P(X \leq x</em>0)
  • Example: Toss 2 Coins. Let X = # heads.

Random Variables and Discrete Probability Distributions: Example

  • Example: Consider the probability distribution which reflects the number of credit cards that Bankrate.com’s readers carry:
    1. Is this a valid probability distribution?
    2. What is the probability that a reader carries no credit cards?
    3. What is the probability that a reader carries less than two?
    4. What is the probability that a reader carries at least two credit cards?

Summary Measures for a Random Variable

  • Mean (Expected Value)
  • Variance
  • Standard Deviation

Mean for a Discrete Random Variable

  • The Mean of a Discrete Random Variable X is a mean outcome of a random experiment if we repeated the experiment many times: μ=xP(x)\mu = \sum xP(x)
  • The Mean of a Discrete Random Variable X is a value that we expect to occur on average if an experiment is repeated a large number of times and denoted by E(X). E(X) is the long-run average value: μ=E(X)=xP(x)\mu = E(X) = \sum xP(x)
    • Expected Value E(X) = Population Mean m

Calculating the Mean

  • Toss 2 coins, x = # of heads, compute expected value of x:
    • E(X)=(0×.25)+(1×.50)+(2×.25)=1.0E(X) = (0 \times .25) + (1 \times .50) + (2 \times .25) = 1.0
    • E[X]=μ=xP(x)E[X] = \mu = \sum xP(x)

Table: Probability Distribution of the Number of Vehicles - Calculating the Mean

  • μ=xP(x)=2.14 or E(x)=2.14\mu = \sum xP(x) = 2.14 \text{ or } E(x) = 2.14

Variance and Standard Deviation of a Discrete Random Variable

  • The Variance and Standard Deviation of a Discrete Random Variable X measure the spread of its probabilities distribution.
  • Variance of a discrete random variable X:
    • σ2=E[(Xμ)2]=(xμ)2P(x)\sigma^2 = E[(X - \mu)^2] = \sum (x - \mu)^2 P(x)
  • Can also be expressed as:
    • σ2=E[X2]μ2=x2P(x)μ2\sigma^2 = E[X^2] - \mu^2 = \sum x^2 P(x) - \mu^2
  • Standard Deviation of a discrete random variable X:
    • σ=σ2=(xμ)2P(x)\sigma = \sqrt{\sigma^2} = \sqrt{\sum (x - \mu)^2 P(x)}

Standard Deviation Example

  • Toss 2 coins, X = # heads, compute standard deviation (recall E[X] = 1)
  • σ=(xμ)2P(x)\sigma = \sqrt{\sum (x - \mu)^2 P(x)}
  • σ=(01)2(.25)+(11)2(.50)+(21)2(.25)=.50=.707\sigma = \sqrt{(0-1)^2(.25) + (1-1)^2(.50) + (2-1)^2(.25)} = \sqrt{.50} = .707
  • Possible number of heads = 0, 1, or 2

Table: Probability Distribution of the Number of Vehicles - Calculating the Standard Deviation

  • σ2=Var(X)=(xμ)2P(x)=x2P(x)μ2\sigma^2 = Var(X) = \sum (x - \mu)^2 P(x) = \sum x^2 P(x) - \mu^2
  • σ2=0.840\sigma^2 = 0.840
  • σ=0.840=0.917\sigma = \sqrt{0.840} = 0.917

PROBLEM 1

  • Electronic company manufactures computer parts that are supplied to many computer companies. Despite the fact that the quality control inspectors check every part for defects before it is shipped to another company, a few defective parts do pass through these inspections undetected. Let X denote the number of defective computer parts in a shipment of 400. The following table gives the probability distribution of X. Compute the mean, variance, and standard deviation of X.

Solution to problem 1

  • μ=E(X)=2\mu = E(X) = 2
  • σ2=0.48\sigma^2 = 0.48
  • σ=0.480.69\sigma = \sqrt{0.48} \approx 0.69

PROBLEM 2

  • A fair coin is tossed three times. Let X denote the number of the heads occurring. Find the distribution, mean, variance and standard deviation of X.

Solution to problem 2

  • μ=E(X)=128=1.5\mu = E(X) = \frac{12}{8} = 1.5
  • σ2=34=0.75\sigma^2 = \frac{3}{4} = 0.75
  • σ=0.750.87\sigma = \sqrt{0.75} \approx 0.87

Bernoulli Process

  • A Bernoulli process consists of a series of n trials of an experiment such that on each trial:
    • There are only two possible outcomes: “success” or “failure”
    • The probabilities of success and failure remain the same from trail to trail
    • Let p denote the probability of success
    • Let 1 – p = q be the probability of failure
  • Define random variable X:
    • X = 1 if success, X = 0 if failure
  • Then the probability distribution is P(0)=(1P)P(0) = (1-P) and P(1)=PP(1) = P

Mean and Variance of a Bernoulli Process

  • The mean is μx=p\mu_x = p
    • μ=E[X]=xP(x)=(0)(1p)+(1)p=p\mu = E[X] = \sum xP(x) = (0)(1-p) + (1)p = p
  • The variance is σx2=p(1p)\sigma^2_x = p(1 – p)
    • σ2=E[(Xμ)2]=(xμ)2P(x)=(0p)2(1p)+(1p)2p=p(1p)\sigma^2 = E[(X - \mu)^2] = \sum (x - \mu)^2 P(x) = (0-p)^2(1-p) + (1-p)^2p = p(1-p)

Developing the Binomial Distribution

  • The number of sequences with X successes in n independent trials is:
    • Cxn=n!x!(nx)!C_x^n = \frac{n!}{x!(n-x)!}
    • Where n! = n·(n – 1)·(n – 2)· . . . ·1 and 0! = 1
  • These sequences are mutually exclusive

Binomial Probability Distribution

  • There are n identical trails - e.g., 15 tosses of a coin; ten light bulbs taken from a warehouse
  • Two mutually exclusive categories - each trial has only two possible outcomes - e.g., head or tail in each toss of a coin; defective or not defective light bulb
  • Constant probability for each trail - e.g., Probability of getting a tail is the same each time we toss the coin
  • The trials are independent - The outcome of one observation does not affect the outcome of the other.

Possible Binomial Distribution Settings

  • A manufacturing plant labels items as either defective or acceptable
  • A firm bidding for contracts will either get a contract or not
  • A marketing research firm receives survey responses of “yes I will buy” or “no I will not”
  • New job applicants either accept the offer or reject it

Binomial Probability Distribution- EXAMPLES

  • EXAMPLE 1: Consider the experiment consisting of 10 tosses of a coin. Determine if it is a binomial experiment.
    1. There are10 identical trials (tosses).
    2. Each trail (toss) has only two possible outcomes: a head and a tail. Let a head be called a success and a tail be called a failure.
    3. The probability of obtaining a head (a success) is 1/2 and of a tail (a failure) is 1/2 for any toss or p = P(H) = 1/2 and 1 - p = q = P(T) = 1/2
    4. The trails (tosses) are independent.
    • The experiment consisting of 10 tosses of a coin satisfies all four conditions of a binomial experiment.
  • EXAMPLE 2: Three cards are selected from a standard 52-card desk, without replacement. The number of kings selected is recorded. Determine if it is a binomial experiment.

The Binomial Distribution Formula

  • P(X)=n!x!(nx)!px(1p)nxP(X) = \frac{n!}{x!(n-x)!} p^x (1-p)^{n-x}
  • P(X) = probability of X successes in n trials, with probability of success p on each trial
  • X = number of ‘successes’ in sample, (X = 0, 1, 2, …, n)
  • n = sample size (number of independent trials or observations)
  • p = probability of “success”
  • Example: Toss a coin four times, let X = # heads: n = 4, p = 0.5, 1 - p = q = (1 - 0.5) = 0.5, X = 0, 1, 2, 3, 4

Parameters of a Binomial Probability Distribution

  • The number of outcomes with exactly X successes among n trials
  • The probability of X successes among n trials for any one particular order
  • q = 1 – p = probability of failure
  • To find the probability of X successes in n trials for a binomial experiment, the only values needed are those of n and p and they are called parameters of the binomial probability distribution.

Example: Calculating a Binomial Probability

  • What is the probability of one success in five trials (observations) if the probability of success is 0.1?
  • X = 1, n = 5, and p = 0.1
  • P(X=1)=5!1!(51)!(0.1)1(10.1)51=5(0.1)(0.9)4=0.32805P(X = 1) = \frac{5!}{1!(5-1)!} (0.1)^1 (1-0.1)^{5-1} = 5 (0.1)(0.9)^4 = 0.32805

Example: Determining a Binomial Probability

  • At the Express House Delivery Service, providing high-quality service to its customers is the top priority of the management. The company guarantees a refund of all charges if a package delivered does not arrive at its destination by the specified time. It is known from past data despite all efforts, 1% of the packages mailed through this company do not arrive at their destinations within the specified time. A corporation mailed 10 packages through Express House Delivery Service on Monday.
    1. Find the probability that exactly one of those 10 packages will not arrive at its destination within the specified time.
    2. Find the probability that at most one of those 10 packages will not arrive at its destination within the specified time.
    3. Find the probability that more than 1 and less than 4 of those 10 packages will not arrive at its destination within the specified time.

Example - Solution: Determining a Binomial Probability

  1. Find the probability that exactly one of those 10 packages will not arrive at its destination within the specified time.
  2. Find the probability that at most one of those 10 packages will not arrive at its destination within the specified time.
  3. Find the probability that more than 1 and less than 4 of those 10 packages will not arrive at its destination within the specified time.
  • P(X=1)=10!1!(101)!(0.1)1(10.1)101P(X = 1) = \frac{10!}{1!(10-1)!} (0.1)^1 (1-0.1)^{10-1}
  • P(X1)=P(X=0)+P(X=1)P(X \leq 1) = P(X = 0) + P(X = 1)
  • P(1 < X < 4) = P(X = 2) + P(X = 3) = P(X \leq 3) - P(X \leq 1)

Mean, Variance, and Standard Deviation of a Binomial Distribution

  • Mean
    • μ=E(X)=np\mu = E(X) = np
  • Variance and Standard Deviation
    • σ2=np(1p)=npq\sigma^2 = np(1-p) = npq
    • σ=np(1p)=npq\sigma = \sqrt{np(1-p)} = \sqrt{npq}
    • Where
      • n = sample size
      • P = probability of success
      • (1 – P) = q = probability of failure

PROBLEMS

  1. A fair coin is tossed 3 times. Let X denote the number of the heads occurring. Find the mean, variance, and standard deviation of X.
  2. Determine the expected number of boys in a family with 8 children, assuming the gender distribution to be equally probable. What is the probability that the expected number of boys does occur?

PROBLEMS

  1. A fair coin is tossed 3 times. Let X denote the number of the heads occurring. Find the mean, variance, and standard deviation of X.
  2. Determine the expected number of boys in a family with 8 children, assuming the gender distribution to be equally probable. What is the probability that the expected number of boys does occur?
  • μ=E(X)=np\mu = E(X) = np
  • σ2=np(1p)=npq\sigma^2 = np(1-p) = npq
  • μ=E(X)=np\mu = E(X) = np
  • P(X=E(X))=P(X=4)P(X = E(X)) = P(X = 4)
  • σ=np(1p)=npq\sigma = \sqrt{np(1-p)} = \sqrt{npq}

Probability of Success and the Shape of the Binomial Distribution

  • The shape of a binomial distribution depends on the values of n and p.
  • For any fixed number of n trials:
    • Symmetric: p = 0.5
    • Skewed to the left: p > 0.5
    • Skewed to the right: p < 0.5

Probability of Success and the Shape of the Binomial Distribution

  • For a fixed p, as the number of trials n increases, the probability distribution will be approximately bell shaped.
  • The acceptable rule to use this approximation is np5np \geq 5 and nq5nq \geq 5

Discrete Random Variables - PROBLEM

  • Example: A player tossed three fair coins. He wins $3 if 3 heads occur, $2 if 2 heads occur, and $1 if only 1 head occurs. On the other hand, he loses $4 if 3 tails occur. Is the game fair? Explain.
    • In a gambling game, the expected value of the game is considered to the value of the player. The game is said to be favorable to the player if the expected value is positive and unfavorable if the expected value is negative. If the expected value is equal to 0, the game is fair.

APPENDIX: USING BINOMIAL TABLES

Using Binomial Tables

  • Examples:
    • n = 10, X = 3, p = 0.35: P(X = 3 | n =10, p = 0.35) = .2522
    • n = 10, X = 8, p = 0.45: P(X = 8 | n =10, p = 0.45) = .0229

Using the Cumulative Binomial Tables

  • n = 10, p = 0.35, X ≤ 4: P(X ≤ 4 | n =10, p = 0.35) = 0.7515
  • 35% of the population support a new regulation, if a random sample of 10 voters is polled, what is the probability that four or fewer of them support the proposition?