Docsity

Introduction to Probability - Lecture Notes | STA 3032, Study notes of Statistics

Toggle sidebar
bg1
1
Introduction to Probability
Probabilities are expressed in terms of events
Examples of Events:
1. Six shows on a roll of a die
2. Jack of Spades is drawn from a deck of cards
3. Rains at 3:00 p.m. today in front of the Reitz Union
4. Have an automobile accident this year
5. Florida beat Florida State
6. Florida beat Tennessee
7. Florida beat Florida State and Tennessee
8. Yield of a randomly drawn citrus tree is greater than 8 boxes
9. Mean yield of 25 randomly drawn citrus trees is greater than
8 boxes
Events are denoted by capital letters, A, B, etc.
Probabilities of events are denoted P(A), or P(event occurs)
Terminology:
Terms in probability relate to terms in mathematical set theory:
Set theory Probability
Universe Universe
Subset of Universe Event
Element in Universe Outcome
Think of an outcome as the result of an experiment. The
“universe” is the set of possible outcomes.
Example: Experiment=”roll a die” → Universe={1,2,3,4,5,6}
Event A: “outcome” is even = {2,4,6} P(A)=3/6=.5
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12

Partial preview of the text

Download Introduction to Probability - Lecture Notes | STA 3032 and more Study notes Statistics in PDF only on Docsity!

Introduction to Probability

Probabilities are expressed in terms of events

Examples of Events:

  1. Six shows on a roll of a die
  2. Jack of Spades is drawn from a deck of cards
  3. Rains at 3:00 p.m. today in front of the Reitz Union
  4. Have an automobile accident this year
  5. Florida beat Florida State
  6. Florida beat Tennessee
  7. Florida beat Florida State and Tennessee
  8. Yield of a randomly drawn citrus tree is greater than 8 boxes
  9. Mean yield of 25 randomly drawn citrus trees is greater than 8 boxes

Events are denoted by capital letters, A, B, etc.

Probabilities of events are denoted P(A), or P(event occurs)

Terminology:

Terms in probability relate to terms in mathematical set theory:

Set theory Probability Universe Universe Subset of Universe Event Element in Universe Outcome

Think of an outcome as the result of an experiment. The “universe” is the set of possible outcomes. Example: Experiment=”roll a die” → Universe={1,2,3,4,5,6} Event A: “outcome” is even = {2,4,6} P(A)=3/6=.

More on Terminology of Probability

Think about the events “Florida beat FSU” and “Florida

beat Tennessee.” These are events pertaining to winning

games in the football season. Let’s try to determine a set of

outcomes that would allow us to describe all possible such

events. There may be several ways to do this. Perhaps the

most basic is a list of all possible win-loss records for the

regular season of 12 games. There are 2^12 =4096 of these

outcomes—that’s the number of “elements” in the universe

set. We could list them as follows:

Outcomes

Game

1 W W W W … W … W L

2 W W W W … W … L L

3 W W W W … W … L L

4 W W W W … W … L L

5 W W W W … L … L L

6 W W W W … W … L L

7 W W W W … L … L L

8 W W W W … W … L L

9 W W W W … W … L L

10 W W W L … W … L L

11 W W L W … W … L L

12 W L W W … W … L L

# Wins 12 11 11 11 … 10 … 1 0

# Losses 0 1 1 1 … 2 … 11 12

Determination of Probabilities

Probabilities are determined from:

  1. Relative frequency computation
  2. Subjective assessment

P(six on roll of die)=1/6, a relative frequency computation

P(Florida beat Florida State)=.8, a subjective assessment

P(Rain today at 3:00 at JWRU)=.4, combination of relative frequency and subjective assessment

Compound Events and Probabilities of Compound

Events

Compound events are formed from combinations of events.

The union of events A and B occurs if either A or B occur

{Florida beat FSU}U{Florida beat Tennessee}={Florida beat either FSU or Tennessee}

The intersection of events A and B occurs if both A and B occur

{Florida beat FSU} ∩ {Florida beat Tennessee}={Florida beat both FSU and Tennessee}

Calculating Probabilities of Compound Events

P(AUB)=P(A)+P(B)-P(A ∩ B)

P{Florida beat either FSU or Tennessee}=P{Florida beat FSU}+P{Florida beat Tennessee}-P{Florida beat both FSU and Tennessee}

Two events, A and B, are disjoint if they are mutually exclusive; i.e., if A ∩ B=Φ, where Φ={ } is the “empty” set.

If A and B are disjoint, then P(AUB)=P(A)+P(B)

Two events, A and B, are independent if P(A ∩ B)=P(A)P(B)

Are the events {Florida beat FSU} and {Florida beat Tennessee} independent?

Are the events {Drives 4WD truck} and {Voted Republican} independent?

Are the events {Drives Prius} and {Voted Republican} independent?

Are the events {Lives in Florida} and {Voted Republican} independent?

Application

P(PC+) = 50 1. 10000 200 398 P(PSA+) =. 10000 48 P(PC+ PSA+) =. 10000

= =

=

∩ =

Conditional Probability: P(A given B) = P(A|B) =

P(A B) P(B)

∩

Sensitivity = P(PSA+ |PC+ ) = (48/10000)/(50/10000) =.

Specificity = P(PSA- | PC-) = (9600/10000)/(9950/10000) =.

Predictive value = P(PC+ |PSA+) = P(PC+∩PSA+)/P(PSA+) = P(PSA+|PC+)P(PC+)/P(PSA+) = (.96x.005)/.0398 =.

This is an example of the application of “Bayes’ Rule.” It allowed us to calculate the conditional probability P(PC+ |PSA+) using the other one, P(PSA+ |PC+ ).

More generally, suppose A (^) 1, A 2 , … An is a partitioning of the universe, i.e. U is the union of A (^) 1, A2, … An , and the intersection of any two of the A (^) i sets is empty. You want to calculate P(Ak |B), where know P(B|A (^) 1), … , P(B|A (^) n), and you also know P(A (^) 1), … , P(A (^) n). Bayes Rule says that

P(Ak|B) = P(B|Ak)P(Ak) / [P(B|A1)P(A1)+ … + P(B|A (^) n)P(An)]

In the prostate cancer application, A1, A2, … An could represent the various stages of prostate cancer, and B is the event of a positive diagnosis. From epidemiological records you might know P(B|A (^) i ), the probability of positive diagnosis for each stage, and P(Ai ), the probabilities of various stages.

Prostate Cancer

  • (^48 350 ) PSA Test -^2 9600

50 9950 10000

Random Variables:

Random variables are functions that describe the outcomes of an “experiment.” They are usually denoted with a capital letter, such as X or Y. RVs can be either discrete of continuous. A discrete random variable has a “countable” number of values, meaning that they could be listed. A continuous random variable has an uncountable number of numeric values, meaning they cannot be listed. Here are some examples:

Discrete

  • spots on top face of die (1, 2, 3, 4, 5, 6)

  • suit of drawn card (C, D, H, S)
  • aphids on leaf (0, 1, 2, 3, …)

  • defects in box of 1000 nails (0, 1, 2, …, 1000)

  • germinating seeds out of 50 (0, 1, 2, …, 50)

Continuous

  • heights of people (0 -- ?)
  • ph of soil (0 – 10)
  • voltage in circuit (0 -- ?)

Discrete random variables have probability (mass) function s which we denote p(x). The probability function gives probabilities of each individual value of the RV, e.g. P X ( = x ) = p x ( ).

Continuous random variables have probability density functions which we denote f(x). The probability density function can be used to give probabilities of ranges of values of the continuous RV. For example, 2 (^1 ) ( ) ( )

x P x < X < x = (^) ∫ x f x dx

Binomial Random Variable

Let X = Number of successes out of n trials, in which the probability of success on each trial is a number π. Then X has a binomial distribution with parameters n and π. This is abbreviated X ~ B(n, π).

Example: Consider flipping a coin, and declare a “success” if a head (H) appears. Then the probability of success is .5. That is, π=P(S)=.5. Suppose the coin is flipped n=3 times, and X = number of heads. Then x ~ B(3, .5). The possible values of x are (0, 1, 2, 3). The probability of any event is (1/2)^3 = 1/8.

Events: HHH HHT HTH THH HTT THT TTH TTT

Heads 3 2 2 2 1 1 1 0

P(Event) 1/8 1/8 1/8 1/8 1/8 1/8 1/8 1/

P(3 H) = 1/8 P(2 H) = 3/8 P(1 H) = 3/8 P(0 H) = 1/

In general: P(k H) =

3! 1 3 3! 1 k !(3 k )! 2 k !(3 k )! 8

⋅ ⎛^ ⎞^ = ⋅⎛^ ⎞ − ⎜^ ⎟^ − ⎜^ ⎟ ⎝ ⎠ ⎝ ⎠

0 1 2 3

Binomial Random Variable (con’t)

Example: X = number of 1’s in 3 rolls of die (0, 1, 2, 3)

Events: 111 11X 1X1 X11 1XX X1X XX1 XXX

1’s 3 2 2 2 1 1 1 0

P(Event) 1 3 /6 3 1 25 1 /6 3 1 25 1 /6 3 1 25 1 /6 3 1 1 · 5 2 /6 3 1 1 · 5 2 /6 3 1 1 · 5 2 /6 3 5 3 /

P(3 1’s) =

3

P(k 1’s) =

3

k k

k k

−

The probability mass function is given by the so-called Binomial Formula:

π (^) = probability of success on single trial

P(x successes in n trials) =

n x n x

x n x

Mean of the binomial distribution: n^ π

Variance of the binomial distribution: n^ π^ (1^ −π)

0.

0.

**0.

0 1 2 3**

Using the Normal Distribution

Standardizing a Normal Distribution:

If Y ~ N(μ,σ^2 ), then Z = ( Y – μ)/σ ~ N(0,1).

This result allows us to compute probabilities from any normal distribution using tables or a computer program for the standard normal distribution.

If you wanted to calculate the probability that a random variable y is greater that 1.42 standard deviations above its mean, you would compute:

( 1.42 ) ( 1.42) ( 1.42). Y P Y P P Z μ μ σ σ

− > + = > = > =

As a more specific application, suppose you believe the egg weights to be normally distributed with mean 65.4 and standard deviation 5.17. You would calculate the probability that a randomly drawn egg is greater than 72 as:

P Y ( > 72) = P (( Y − 65.4) / 5.2) > (72 − 65.4) / 5.2) = P Z ( > 1.27) =.

Using the normal distribution—an application

Egg weights are normally distributed with mean μ^ =^65 (g) and

standard deviation σ^ =^ 5.0.

  1. What is the probability one randomly drawn egg will exceed: a. 65 b. 66 c. 70 d. 75

Let Y = egg weight. Then

a. P( Y > 65) = 65 65 65 5 5 P ⎛^^ Y −^ > − ⎞ ⎜⎝ ⎟⎠ = P( Z^ > 0) = ½ =.

b. P( Y > 66) = 65 66 65 5 5 P ⎛^^ Y −^ > − ⎞ ⎜⎝ ⎟⎠ = P( Z^ > .2) =.

c. P(Y > 70) = 65 70 65 5 5 P ⎛^^ Y −^ > − ⎞ ⎜⎝ ⎟⎠ = P( Z^ > 1) =.

d. P( Y > 75) = 65 75 65 5 5 P ⎛^^ Y −^ > − ⎞ ⎜⎝ ⎟⎠ = P( Z^ > 2) =.

  1. What is the probability one egg is between 66 and 70 g? P(66 < Y < 70) = P( Y > 66) – P( Y > 70) = .4207 - .1587 =.

Probabilities of this type can be expressed in terms of the cumulative distribution function

P Z ( z ) F z ( )^ z (2 π ) −^ 1/ 2^ exp( z^2 / 2)

−∞

The integral for the normal distribution is difficult to evaluate, so tables or computer programs are used to obtain actual values.

Normal Approximation to the Binomial

The calculation on the previous page would be tedious by hand, but many computer programs are available that can readily do it. However, even good computer programs may fail for computations involving extremely large n.

The normal approximation sets μ = nπ and σ^2 = nπ(1-π), and assumes Y ~N(μ,σ^2 ) to evaluate the probability. The approximation is improved by using a continuity correction , which means you compute P( Y ≥18-.5) = P( Y ≥17.5).

The normal approximation is then computed as:

μ = nπ = 20(.75) = 15 σ^2 = nπ(1-π) = 20(.75)(.25) = 3. σ = 3.75 1/2^ = 1.

P( Y ≥17.5) = P(( y – 15)/1.94 ≥ (17.5 – 15)/1.94)

= P( Z ≥ 1.29) = 1 - .901 = .099.

This is a reasonable approximation to the exact binomial probability of P( Y ≥18) = .091.

Means and Variances of Random Variables

Means of random variables are called expected values , denoted

μ = E ( X )

If X is a continuous RV, then

μ (^) X = E X ( ) = (^) ∫ xf ( ) x dx

If X is a discrete RV, then

X (^ )^ i (^ i )

i

μ = E X = (^) ∑ x p x

Variances of random variables are also expected values.

If X is a continuous RV, then

σ X = E X − μ = (^) ∫ x −μ f x dx

If X is a discrete RV, then

X i i i

σ = E X − μ = (^) ∑ x −μ p x