Probability-Bayes Theorem and Discrete

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 46

Probability-Bayes Theorem

and Discrete
In a neighborhood, 90% children were falling sick due to flu and 10% due to measles and
no other disease. The probability of observing rashes given that he has measles is 0.95 and
given that he has flu is 0.08. If a child develops rashes, find the child’s probability of
having flu. Hence, does rashes act as a symptom for flu?
CASE STUDY-FORD PINTO
• (192) Top Secret! Pinto exploding scene - including "Got to hand it to t
he Germans" comment. - YouTube
• The data shows that 1000 people have suffered an injury or death driving FORD
Pinto. Out of these 1000, 800 got injured, and 200 died. In 400 cases the car blasted.
• Probability that a person was injured given that car blasted is 30 percent. Further,
probability that the person died given that car blasted is 20 percent. Ford company
argued that the blast was unfortunate; however, there could have been people who
got injured/ died before the blast due to weak safety standards in the car. As a jury,
a. you are required to find the probability that the blast happened given that person
got injured?. b. you are required to find the probability that the person died given
that blast did not happen?.

• If the cases in b. are greater than 50 percent then Ford need to pay 50 million dollars
else 150 million, what is your verdict?
BAYES THEOREM
• Thereby, we have all the data with us then bayes theorem is of no use; However, if
there’s missing data Bayes theorem helps

• P(no cheesecake and likes rum|likes rum)= 12/20

• P (likes rum)= 20/44

• P (does not like cheese cake)= 22/44

• P(no cheesecake and likes rum| does not like cheesecake)?


Q1
• Bayes’ Theorem Example #1
• You might be interested in finding out a patient’s probability of having liver disease
if they are an alcoholic. “Being an alcoholic” is the test (kind of like a litmus test) for
liver disease.
• Past data tells you that 10% of patients entering your clinic have liver disease =
0.10.
• Five percent of the clinic’s patients are alcoholics. = 0.05.
• You might also know that among those patients diagnosed with liver disease, 7%
are alcoholics. (hint: given that they have liver disease)

• Find probability that the patient has liver disease given that he/she is an alcoholic?
Q2
• In a particular pain clinic, 10% of patients are prescribed narcotic pain
killers. Overall, 5% of the clinic’s patients are addicted to narcotics
(including pain killers and illegal substances). Out of all the people
prescribed pain pills, 8% are addicts. If a patient is an addict, what is
the probability that they will be prescribed pain pills?
https://create.kahoot.it/share/bayes-cp/3d9ed875-a080-4201-aada-d04
376515053
Chapter 5
Discrete Probability
• Random Variables
Distributions
• Developing Discrete Probability Distributions
• Expected Value and Variance
• Binomial Probability Distribution .40

• Poisson Probability Distribution .30

.20

.10

0 1 2 3 4

10
Thought Experiment 1
• If I roll a die what possible outcomes would come?

• “ Exactly 1”

• “Exactly 2”

• “Exactly 3”

• “Exactly 4”

• “Exactly 5”

• “Exactly 6”

11
Thought Experiment 2
• If I were to measure the average family income in the state of Haryana,
how many outcomes could I get?

• There would be infinite number of possibilities

• If I put on a die numbers from Rs. 20000 to Rs.20000.99 (Rs. 1 interval).


• If I put on a die numbers from Rs. 20000 to Rs.20009.99 (Rs. 10 interval).

12
Random Variables
• A random variable is a numerical description of the outcome of an
experiment.

• Two things to keep in mind


• Random variable itself
• The possible outcomes or values the random variable can take

• Random variable is denoted by “X”


• Outcomes are denoted by lowercase letters (usually x)

• For the die throw the outcomes would be:


• x=1; x=2; x=3; x=4; x=5; x=6

13
• A discrete random variable may assume either a finite number of values or an infinite
sequence of values and the differences between the outcomes is meaningful.

• For example- die throw had outcomes- 1,2,3,4,5,6 and each outcome is meaningfully
different
• People walking in bank

• A continuous random variable may assume any numerical value in an interval or


collection of intervals and the differences are not meaningful.

• For example- the difference beween Rs. 20000 and 20000.01 is not meaningful

14
• Example: JSL Appliances
Let x = number of TVs sold at the store in one day,
where x can take on 5 values (0, 1, 2, 3, 4)

We can count the TVs sold, and there is a finite upper limit on the
number that might be sold (which is the number of TVs in stock).

15
• Example: JSL Appliances
Let x = number of customers arriving in one day,
where x can take on the values 0, 1, 2, . . .

We can count the customers arriving, but there is


no finite upper limit on the number that might arrive.

16
Random Variables
Question Random Variable x Type

Family x = Number of dependents


size reported on tax return

Distance from x = Distance in miles from


home to store home to the store site
Own dog x = 1 if own no pet;
or cat = 2 if own dog(s) only;
= 3 if own cat(s) only;
= 4 if own dog(s) and cat(s)

17
Coin Flip

Outcomes Possible:
Heads
Tails

Probability
Heads- 0.50
Tails- 0.50

18
Discrete Probability Distributions
• The probability distribution for a random variable X describes how
probabilities are distributed over the values of the random variable or
assigning a probability to each outcome of random variable.

• Let 0 = Heads; 1= Tails

• We can describe a discrete robability distribution with a table, graph,


or formula.

19
20
Discrete Probability Distributions

• Die

21
UNIFORM PROBABILITY DISTRIBUTION

22
Discrete Probability Distributions
• The discrete uniform probability distribution is the simplest example of a
discrete probability distribution given by a formula.
• The discrete uniform probability function is

f(x) = 1/n
where: n = the number of values the
random variable may assume
• The values of the random variable are equally likely

23
CLASS SATISFACTION

24
Discrete Probability Distributions
• Two types of discrete probability distributions will be introduced.
• First type: uses the rules of assigning probabilities to experimental
outcomes to determine probabilities for each value of the random variable.
• Second type: uses a special mathematical formula to compute the
probabilities for each value of the random variable.

25
Discrete Probability Distributions
• The probability distribution is defined by a probability function, denoted by
f(x), that provides the probability for each value of the random variable.
• The required conditions for a discrete probability function are:
f(x) > 0 and f(x) = 1

26
Discrete Probability Distributions
• There are three methods for assign probabilities to random variables:
classical method, subjective method, and relative frequency method.
• The use of the relative frequency method to develop discrete probability
distributions leads to what is called an empirical discrete distribution.

(example on next slide)

27
Discrete Probability Distributions
• Example: JSL Appliances
Using past data on TV sales, a tabular representation
of the probability distribution for sales was developed.
Number
Units Sold of Days x f(x)
0 80 0 .40 = 80/200
1 50 1 .25
2 40 2 .20
3 10 3 .05
4 20 4 .10
200 1.00

28
Graph
• https://create.kahoot.it/share/discrete-bba-ba/06d4a2d5-24c5-4cf2-9
9eb-4f3a82771a2b

29
Discrete Probability Distributions
• Example: JSL Appliances

.50
.40 Graphical
Probability

representation
.30 of probability
distribution
.20
.10

0 1 2 3 4
Values of Random Variable x (TV sales)

30
Discrete Probability Distributions
• In addition to tables and graphs, a formula that gives the probability
function, f(x), for every value of x is often used to describe the probability
distributions.
• Several discrete probability distributions specified by formulas are the
discrete-uniform, binomial, Poisson, and hypergeometric distributions.

31
COMPOUND PROBABILITIES
• What is the probability that you get a 2 or a 5 during a roll?

• What is the probability of rolling 4 or less?

• What is the probability that student is satisfied or very satisfied?

32
EXPECTED VALUES
In your Marketing course you will be evaluated on the following basis

33
34
35
Expected Value
• The expected value, or mean, of a random variable is a measure of its
central location.
E(x) =  = xf(x)
• The expected value is a weighted average of the values the random
variable may assume. The weights are the probabilities.
• The expected value does not have to be a value the random variable can
assume.

36
Die

37
UNIFORM PROBABILITY DISTRIBUTION

38
Number
Units Sold of Days
0 80
1 50
2 40
3 10
4 20
200

39
Expected Value
• Example: JSL Appliances
x f(x) xf(x)
0 .40 .00
1 .25 .25
2 .20 .40
3 .05 .15
4 .10 .40
E(x) = 1.20 = expected number of TVs sold in a day

40
Discrete Probability Distributions
• Example: JSL Appliances

.50
.40 Graphical
Probability

representation
.30 of probability
distribution
.20
.10

0 1 2 3 4
Values of Random Variable x (TV sales)

41
Class Satisfaction

42
Variance and Standard Deviation
• The variance summarizes the variability in the values of a random variable.

Var(x) =  2 = (x - )2f(x)

• The variance is a weighted average of the squared deviations of a random


variable from its mean. The weights are the probabilities.
• The standard deviation, , is defined as the positive square root of the
variance.

43
Expected Value
• Example: JSL Appliances
x f(x) xf(x)
0 .40 .00
1 .25 .25
2 .20 .40
3 .05 .15
4 .10 .40
E(x) = 1.20 = expected number of TVs sold in a day

44
Variance
• Example: JSL Appliances

x x- (x - )2 f(x) (x - )2f(x)


0 -1.2 1.44 .40 .576
1 -0.2 0.04 .25 .010
2 0.8 0.64 .20 .128
3 1.8 3.24 .05 .162
4 2.8 7.84 .10 .784
Variance of daily sales = s 2 = 1.660
Standard deviation of daily sales = 1.2884 TVs

45
Class Satisfaction

46

You might also like