Presentation is loading. Please wait.

Presentation is loading. Please wait.

By Hatim Jaber MD MPH JBCM PhD

Similar presentations


Presentation on theme: "By Hatim Jaber MD MPH JBCM PhD"— Presentation transcript:

1 By Hatim Jaber MD MPH JBCM PhD 3+4-7-2018
Faculty of Medicine Epidemiology and Biostatistics ( ) الوبائيات والإحصاء الحيوي Lecture 6 Probability By Hatim Jaber MD MPH JBCM PhD

2 Presentation outline 3+4-7-2018
Time Introduction- Laws of Chance 10:30 to 10:40 Basic concepts 10:40 to 10:50 Additional law of probability 10: 50 to 11:10 Multiplication law of probability Binomial law of probability distribution 11:10 to 11:25 Probability ( chances) from shape of normal distribution or normal curve or of calculated values from tables. 11:25 to 11:35

3 Probability -Laws of Chance-
It started in Europe in 16th century for gambling prediction Then has been used for epidemiology, genetics, insurance, and electronics etc 3

4 Probability It defined as relative frequency or probable chances of occurrence. knowledge about probabilities comes from the relative frequency of a large number of trials Probability theory is the branch of mathematics concerned with analysis of random phenomena.

5 Probability It’s the likelihood, chances, or odds of a particular event happening. It usually expressed by P. The probability of an event is the measure of the chance that the event will occur as a result of an experiment. 5

6 P should be a number between 0 and 1.
The probability of an event A is the number of ways event A can occur divided by the total number of possible outcomes. The same for P(B). The probability of an event A, symbolized by P(A). P should be a number between 0 and 1. If P(A) > P(B) then event A is more likely to occur than event B. If P(A) = P(B) then events A and B are equally likely to occur

7 basic concepts probability of an event = p P= .5 = even odds
0 = certain non-occurrence impossible 1 = certain occurrence inevitable P= .5 = even odds P= .1 = 1 chance out of 10 P= 0 (find 7 in a dice, one swims the Atlantic ocean, P or chance of survival after rabies) P= 1 ( any number from 1-6 in a dice, one dies someday)

8 basic concepts cont.: If the probability of an event happening is P and that not happening is q then q = 1 – P or P + q = 1 P = total number of occurrences of the event / total number of trials P is a (proportion)

9 Ex 1: A jar contains : 3 red marbles, 7 green marbles and 10 white marbles. If a marble is drawn from the jar at random, what is the probability that this marble is white?

10 Answer 1 : Color frequency: red 3, green 7, white 10. The total number is 20 P = 10 \ 20 = 1 \ 2

11 Problem   A spinner has 4 equal sectors colored yellow, blue, green and red. What are the chances of landing on blue after spinning the spinner? What are the chances of landing on other colors ?

12 Definitions An experiment is a situation involving chance or probability that leads to results called outcomes.In the problem above, the experiment is spinning the spinner An outcome is the result of a single trial of an experiment.The possible outcomes are landing on yellow, blue, green or red An event is one or more outcomes of an experiment.One event of this experiment is landing on blue Probability is the measure of how likely an event is.The probability of landing on blue is one fourth.

13 Experiment 1 A spinner has 4 equal sectors colored yellow, blue, green and red. After spinning the spinner, what is the probability of landing on each color ? Outcomes:  The possible outcomes of this experiment are yellow, blue, green, and red

14    The chances of landing on blue are 1 in 4, or one fourth.  
The chances of landing on other colors are 3 in 4, or three fourth.

15 Probabilities Solution:
P(yellow) = no. of ways to land on yellow / total no. colors = ¼ P(blue)  =  no. of ways to land on blue /total no. of colors = 1 / 4 P (green)= no. of ways to land on green/ total no. of colors  = 1 /4 P (red)  = no. of ways to land on green/ total no. of colors  = /4 P of other colors is = ¾ or we can say 1 – ¼ = 3/4  

16 Experiment 2 A single 6-sided die is rolled.
What is the probability of each outcome? What is the probability of rolling an even number? of rolling an odd number? Outcomes:  The possible outcomes of this experiment are 1, 2, 3, 4, 5 and 6.

17 Probabilities P(1)= # of ways to roll a 1 = 1 total # of sides 6

18 P(5)  =  # of ways to roll a 5  =  1 total # of sides   P(6)  =  # of ways to roll a 6  =  1 total # of sides P(even)=# ways to roll an even number  =  3  =  total # of sides P(odd)  =  # ways to roll an odd number   =  3  =  total # of sides

19 What’s the probability of being Rhesus +ve? 1 – P = q 1- 1/10= 9/10
Example: If P of Rhesus –ve = 1/10 What’s the probability of being Rhesus +ve? 1 – P = q 1- 1/10= 9/10 If P of a pregnancy resulting in a multiple birth is 1/80 What’s the probability of a single birth? 1 – 1/80 = 79/80 19

20 Ex : From 200 Kidney transplant succeeds occur in 80 cases
Ex : From 200 Kidney transplant succeeds occur in 80 cases. So p of survival calculated as? What is P for failure?

21 Answer : P = no. of survival / total number of patients = 80 / 200 = 2/ 5 = 0.4 q = 1- p = 1- 2/5 = 3/5 = 0. 6

22 The probability that a coin will fall head
If one event precludes the possibility of other specified events, the events are mutually exclusive Tossing a head or a tail with one throw of a coin are mutually exclusive (do not occur together) When all possible outcomes of mutually exclusive events are given, their probabilities sum to 1

23 Laws of probability 1- Additional law of probability
2- Multiplication law of probability 3- Binomial law of probability distribution 4- Probability ( chances) from shape of normal distribution or normal curve. 5- Probability of calculated values from tables.

24 Addition Law of Probability
The probability that an event will occur in one of several possible ways is the sum of the individual probabilities of these separate events The addition rule is a result used to determine the probability that event A or event B will occurs. The result is often written as follows, using set notation: P(A U B)= P (A) + P (B) مسألة

25 Addition Rule P(A) = probability that event A occurs P(B) = probability that event B occurs P(A U B)= Probability that event A or event B can occur. The addition rule therefore reduces to: P(A U B)= P (A) + P (B)

26 Examples on Addition Law of Probability
What’s the probability of throwing a “6” or a “2” with a particular one set of dice? 1/6 + 1/6 = 2/6= 1/3 -- What’s the probability of tossing a coin a “head” or a “tail” with one throw? All the probabilities =½+ ½= 1 (it’s inevitable) 26

27 Question: A glass jar contains: 6 red, 5 green, 8 blue and 3 yellow marbles. If a single marble is chosen at random from the jar, what is the probability of choosing a red marble? a green marble or a blue marble?

28 Answer : The possible outcomes of this experiment are red, : 3\11=6 \ 22 P of Green or blue ? 5 \ \ 22 = 13\22

29 Example 2 A large basket of fruit contains 3 oranges, 2 apples and 5 bananas. If a piece of fruit is chosen at random, what is the probability of getting an orange or a banana? a. 1/2 b. 4/5 c. 1/17 d. None of the above

30 Example 3 In a class of 30 students, there are 17 girls and 13 boys
Example 3 In a class of 30 students, there are 17 girls and 13 boys. Five are A students, and three of these students are girls. If a student is chosen at random, what is the probability of choosing a girl or an A boy student? a.11\15 b.17\180 c.19\30 d. None of the above

31 What’s the probability of being a single and Rhesus +ve birth?
We can’t use the Addition Law of probability Why? Because these events can occur together (they are not mutually exclusive) 31

32 Multiplication Law of Probability
It applies to events which do not affect each other (are independent) occurring together Independent events which do not affect each other. The multiplication rule is a result used to determine the probability that two events, A and B, both occur.

33 Multiplication Law of Probability
Where: P(A) = probability that event A occurs P(B) = probability that event B occurs P (A ∩ B)= probability that event A and event B occur مسألة

34 Multiplication Law of Probability
For independent events, that is events which have no influence on one another, the rule simplifies to: P (A ∩ B)= P (A) . P (B) That is, the probability of the joint events A and B is equal to the product of the individual probabilities for the two events.

35 Examples -- What’s the probability of being a single and Rhesus+ve birth? 9/10 X 79/80= 711/800 -- If the probability of a female birth is ½, what’s the probability of being a female Rhesus+ve birth? ½ X 9/10= 9/20 -- What’s the probability of being a female single Rhesus+ve birth? ½ X 79/80 X 9/10= 711/1600 35

36 Example A bag contains: 4 white shirt , 6 black shirt , and 1 green shirt . What is the probability of drawing: a) A white shirt ? b) A black shirt ? c) A white shirt or a black shirt ? d) A white shirt or a green shirt? E) white shirt and a green shirt?

37 Answer s P white = 4\11 P green = 1\11 A white or black = 4\11+6\11= 10\11 A white or green = 4\11+1\11= 5\11 A white and green = 4/11x 1/11 = 4/121

38 Example If a fair coin and a die is tossed what is the probability of getting a head and four? Answer P (A) = 1\2 P (B) = 1\6 P (A+ B) = 1\2 x 1\6 = 1\12

39 Example A pair of dice is rolled
Example A pair of dice is rolled. What is the probability of getting a sum of 2? a. 1\3 b. 1\6 c. 1\36 d. None of the above 39

40 Example In an addiction treatment, failure occurs with P 60% a) What’s P for success of the treatment for one addict? b) What’s P for failure of the treatment for two addicts? c) What’s P for success of the treatment for two addicts?

41 Answer 15 a) 1- 6/10= 4/10= 0.4 b) 6/10 . 6/10 = 36/100 = 0.36 c) 4/10. 4/10 = 16/100 = 0.16

42 P(A U B)= P (A)+ P (B) Probability that event A or event B occurs.
P (A ∩ B)= P (A).P (B) Probability that event A and event B both occur. For mutually exclusive events, mean events which cannot occur together

43 Question 2: Which of these numbers cannot be a probability. a) -0
Question 2: Which of these numbers cannot be a probability? a) b) 0.5 c) d) 0 e) 1 f) 20%

44 The blood groups of 200 people is distributed as follows:
50 have type A blood, 65 have B blood type, 70 have O blood type and 15 have type AB blood. If a person from this group is selected at random, what is the probability that this person has O blood type? Having a person with blood group O or A?

45 Answer : P= 70\200= 0.35 P = 70/ /200 = 120/200 = 0.6

46 Binomial Distributions

47 Objectives / Assignment
How to determine if a probability experiment is a binomial experiment How to find binomial probabilities using the binomial probability table and technology How to construct a binomial distribution and its graph How to find the mean, variance and standard deviation of a binomial probability distribution

48 Binomial Experiments There are many probability experiments for which the results of each trial can be reduced to two outcomes: success and failure. For instance, when a basketball player attempts a free throw, he or she either makes the basket or does not. Probability experiments such as these are called binomial experiments.

49 Definition A binomial experiment is a probability experiment that satisfies the following conditions: 1. The experiment is repeated for a fixed number of trials, where each trial is independent of the other trials. 2. There are only two possible outcomes of interest for each trial. The outcomes can be classified as a success (S) or as a failure (F). 3. The probability of a success, P(S), is the same for each trial. 4. The random variable, x, counts the number of successful trials. All true except

50 To find binomial probabilities:
Direct substitution. (can be hard if n is large) Use approximation Computer software (most common source) Binomial table

51 Binomial theorem Summarizes how odds/probabilities are distributed among the events that can arise from a series of trials P(n,x,p) probability of k successes in n trials where the probability of success on any one trial is p “success” = some specific event or outcome x specified outcomes n trials p probability of the specified outcome in 1 trial

52 Notation for Binomial Experiments
Symbol Description n The number of times a trial is repeated. p = P(S) The probability of success in a single trial. q = P(F) The probability of failure in a single trial (q = 1 – p) x The random variable represents a count of the number of successes in n trials: x = 0, 1, 2, 3, n.

53 Note: Here is a simple example of binomial experiment.
From a standard deck of cards, you pick a card, note whether it is a club or not, and replace the card. You repeat the experiment 5 times, so n = 5. The outcomes for each trial can be classified in two categories: S = selecting a club and F = selecting another suit. The probabilities of success and failure are: p = P(S) = ¼ and q = P(F) = ¾. The random variable x represents the number of clubs selected in the 5 trials. Note that x is a discrete random variable because its possible values can be listed.

54 Ex. 1: Binomial Experiments
Decide whether the experiment is a binomial experiment. If it is, specify the values of n, p and q and list the possible values of the random variable, x. If it is not, explain why. 1. A certain surgical procedure has an 85% chance of success. A doctor performs the procedure on eight patients. The random variable represents the number of successful surgeries.

55 Ex. 1: Binomial Experiments
Solution: the experiment is a binomial experiment because it satisfies the four conditions of a binomial experiment: In the experiment, each surgery represents one trial. There are eight surgeries, and each surgery is independent of the others. Also, there are only two possible outcomes for each surgery—either the surgery is a success or it is a failure. Finally, the probability of success for each surgery is 0.85. n = 8 p = 0.85 q = 1 – 0.85 = 0.15 x = 0, 1, 2, 3, 4, 5, 6, 7, 8

56 Ex. 2: Binomial Experiments
Decide whether the experiment is a binomial experiment. If it is, specify the values of n, p and q and list the possible values of the random variable, x. If it is not, explain why. 2. A jar contains 5 red marbles, 9 blue marbles and 6 green marbles. You randomly select 3 marbles from the jar, without replacement. The random variable represents the number of red marbles.

57 Ex. 2: Binomial Experiments
Solution: The experiment is not a binomial experiment because it does not satisfy all four conditions of a binomial experiment. In the experiment, each marble selection represents one trial and selecting a red marble is a success. When selecting the first marble, the probability of success is 5/20. However because the marble is not replaced, the probability is no longer 5/20. So the trials are not independent, and the probability of a success is not the same for each trial.

58 Binomial Probabilities
There are several ways to find the probability of x successes in n trials of a binomial experiment. One way is to use the binomial probability formula. Binomial Probability Formula In a binomial experiment, the probability of exactly x successes in n trials is:

59 n! = n*(n-1)*(n-2)…*1 (where n is an integer) 0!=1

60 Ex. 2 Finding Binomial Probabilities
A six sided die is rolled 3 times. Find the probability of rolling exactly one 6. Roll 1 Roll 2 Roll 3 Frequency # of 6’s Probability (1)(1)(1) = 1 3 1/216 (1)(1)(5) = 5 2 5/216 (1)(5)(1) = 5 (1)(5)(5) = 25 1 25/216 (5)(1)(1) = 5 (5)(1)(5) = 25 (5)(5)(1) = 25 (5)(5)(5) = 125 125/216 You could use a tree diagram

61 Ex. 3 Finding Binomial Probabilities
There are three outcomes that have exactly one six, and each has a probability of 25/216. So, the probability of rolling exactly one six is 3(25/216) ≈ Another way to answer the question is to use the binomial probability formula. In this binomial experiment, rolling a 6 is a success while rolling any other number is a failure. The values for n, p, q, and x are n = 3, p = 1/6, q = 5/6 and x = 1. The probability of rolling exactly one 6 is: Or you could use the binomial probability formula

62 Ex. 2 Finding Binomial Probabilities
By listing the possible values of x with the corresponding probability of each, you can construct a binomial probability distribution.

63 Ex. 3: Constructing a Binomial Distribution
In a survey, American workers and retirees are asked to name their expected sources of retirement income. Seven workers who participated in the survey are asked whether they expect to rely on social security for retirement income. Create a binomial probability distribution for the number of workers who respond yes. P for yes is 0. 36

64 Solution From the graph, you can see that 36% of working Americans expect to rely on social security for retirement income. So, p = 0.36 and q = Because n = 7, the possible values for x are 0, 1, 2, 3, 4, 5, 6 and 7. x P(x) 0.044 1 0.173 2 0.292 3 0.274 4 0.154 5 0.052 6 0.010 7 0.001 P(x) = 1 Notice all the probabilities are between 0 and 1 and that the sum of the probabilities is 1.

65 Note: Finding binomial probabilities with the binomial formula can be a tedious and mistake prone process. To make this process easier, you can use a binomial probability Table B lists the binomial probability for selected values of n and p.

66 How to use Table V Example: The probability that a lunar eclipse will be obscured by clouds at an observatory near Buffalo, New York, is use table V to find the probabilities that at most three of 8 lunar eclipses will be obscured by clouds at that location.

67 Ex. 4: Finding a Binomial Probability Using a Table
Fifty percent of working adults spend less than 20 minutes commuting to their jobs. If you randomly select six working adults, what is the probability that exactly three of them spend less than 20 minutes commuting to work? Use a table to find the probability. Solution: A portion of Table is shown here. Using the distribution for n = 6 and p = 0.5, you can find the probability that x = 3, as shown by the highlighted areas in the table.

68 Ex. 4: Finding a Binomial Probability Using a Table
The probability if you look at n = 6 and x = 3 over to 0.50 is So the probability that exactly 3 out of the six workers spend less than 20 minutes commuting to work is 0.312 Ex. 5 Using Technology to find a Binomial Probability An even more efficient way to find binomial probability is to use a calculator or a computer. For instance, you can find binomial probabilities by using Excel on the computer.

69 Example: Treatment of Kidney Cancer
X ~ BIN(40,.20), find the probability that 16 or more patients survive at least 5 years. USE COMPUTER! Binomial Probability calculator in JMP probabilities are computed automatically for greater than or equal to and less than or equal to x. Enter n = sample size x = observed # of “successes” p = probability of “success”

70 Example: Treatment of Kidney Cancer
X ~ BIN(40,.20), find the probability that 16 or more patients survive at least 5 years. USE COMPUTER! Binomial Probability calculator in JMP P(X > 16) = The chance that we would see 16 or more patients out of 40 surviving at least 5 years if the new method has the same chance of success as the current methods (20%) is VERY SMALL, .0029!!!!

71 Ex. 6: Finding Binomial Probabilities
A survey indicates that 41% of American women consider reading as their favorite leisure time activity. You randomly select four women and ask them if reading is their favorite leisure-time activity. Find the probability that: exactly two of them respond yes, (2) at least two of them respond yes, and (3) fewer than two of them respond yes.

72 Ex. 6: Finding Binomial Probabilities
#1--Using n = 4, p = 0.41, q = 0.59 and x =2, the probability that exactly two women will respond yes is:

73 Ex. 6: Finding Binomial Probabilities
#2--To find the probability that at least two women will respond yes, you can find the sum of P(2), P(3), and P(4). Using n = 4, p = 0.41, q = 0.59 and x =2, the probability that at least two women will respond yes is:

74 Ex. 6: Finding Binomial Probabilities
#3--To find the probability that fewer than two women will respond yes, you can find the sum of P(0) and P(1). Using n = 4, p = 0.41, q = 0.59 and x =2, the probability that at least two women will respond yes is:

75 Ex. 7: Constructing and Graphing a Binomial Distribution
65% of American households subscribe to cable TV. You randomly select six households and ask each if they subscribe to cable TV. Construct a probability distribution for the random variable, x. Then graph the distribution.

76 Ex. 7: Constructing and Graphing a Binomial Distribution
65% of American households subscribe to cable TV. You randomly select six households and ask each if they subscribe to cable TV. Construct a probability distribution for the random variable, x. Then graph the distribution. x 1 2 3 4 5 6 P(x) 0.002 0.020 0.095 0.235 0.328 0.244 0.075 Because each probability is a relative frequency, you can graph the probability using a relative frequency histogram as shown on the next slide.

77 Ex. 7: Constructing and Graphing a Binomial Distribution
Then graph the distribution. x 1 2 3 4 5 6 P(x) 0.002 0.020 0.095 0.235 0.328 0.244 0.075 Relative Frequency NOTE: that the histogram is skewed left. The graph of a binomial distribution with p > .05 is skewed left, while the graph of a binomial distribution with p < .05 is skewed right. The graph of a binomial distribution with p = .05 is symmetric. Households

78 ex: coin toss we toss a coin three times, defining the outcome head as a “success”… what are the possible outcomes? how do we calculate their probabilities?

79 coin toss (cont.) x how do we assign values to P(n,x,p)?
3 trials; n = 3 even odds of success; p=.5 P(3,x,.5) there are 4 possible values for ‘x’, and we want to calculate P for each of them x TTT 1 HTT (THT,TTH) 2 HHT (HTH, THH) 3 HHH “probability of x successes in n trials where the probability of success on any one trial is p”

80

81 Mean, Variance and Standard Deviation
Although you can use the formulas learned previously for mean, variance and standard deviation of a probability distribution, the properties of a binomial distribution enable you to use much simpler formulas. They are on the next slide.

82 Population Parameters of a Binomial Distribution
Mean:  = np Variance: 2 = npq Standard Deviation:  = √npq

83 Ex. 8: Finding Mean, Variance and Standard Deviation
In Pittsburgh, 57% of the days in a year are cloudy. Find the mean, variance, and standard deviation for the number of cloudy days during the month of June. What can you conclude? Solution: There are 30 days in June. Using n=30, p = 0.57, and q = 0.43, you can find the mean variance and standard deviation as shown. Mean:  = np = 30(0.57) = 17.1 Variance: 2 = npq = 30(0.57)(0.43) = 7.353 Standard Deviation:  = √npq = √7.353 ≈2.71

84 Summary Probability is the likelihood that a particular event will occur. Conditions of classical probability are: mutually exclusive, and equally likely.

85 Properties of Probability
Given some process with n mutually exclusive outcomes (E1, E2, …, En), then The sum of the probability of the mutually exclusive is one. For any two mutually exclusive events (E1, E2), the probability of either E1 orE2=

86 Calculating Probability
Conditional Probability is the chance that an event will occur, given that some events has already occurred P(A|B). What is the probability of selecting subject used cocaine 100+, given the selected subject is male? P(C|M)= 25/75 = 0.33 Joint Probability is the chance of two or more events occurring together P(AB). What is the probability of selecting male subject used cocaine 100+, given the selected subject is male? P(C  M)= P(C|M ) P(M) =(75/111) *(0.33) = Addition Rule is the chance that A event, or B event, or both is P(AB)= P(A)+P(B)- P(AB). What is the probability of selecting subject to be male or used cocaine 100+, or both? P(C  M)= 34/ / /111 + =

87 Calculating Probability
Independent events is the chance that an event A occur regardless of whether or not B occurs P(A|B)= P(A). What is the probability of selecting subject used cocaine 100+, given the selected subject has green eye? P(c|t)= 34/111 = The properties of independent events are: P(AB)= P(A)P(B) P(A|B)= P(A), and P(B|A)= P(B). P(AB)= P(A)P(B).

88 Probability rules Mutually excluded events
Two events are mutually excluded if the occurrence of an event avoid the occurrence of the other. For example If a baby is male, cannot be female. If a child had positivity for E. histolytic, can not had negativity. The probability of occurrence of two mutually excluded events, is the probability of occurrence of an event or another, and we can obtain the probability, add the individual probabilities of each event.

89 Probability rules Example 100 new born in a maternity of Celaya
55 were females and 45 males Probability to be female 55/100 = 0.55 Probability to be male 45/100=0.45 Probability to be anyone = = 1.00

90 Probability rules Example 200 children with a test for E. histolytic
59 had positive result. 151 had negative result Probability of positivity for E. histolytic was 59/200= 0.295 Probability of negativity for E. histolytic was 51/200 = 0.705 Probability for positive or negative result was = 1.00

91 Probability rules Independent events
Two events are independents if the occurrence of a event does not affect the occurrence of the second event. Example If the first new born is male, does not affect that the next be female. Probability of two independent events is obtained multiplying individual probabilities of each event. This is the multiplicative law of probability.

92 Probability rules Example
In a blood bank, they determined blood groups: Group n % 45 A 29 B 21 AB 5 Total 100 Probability to be 0 group is 0.45 = 45% Probability to be A group is 0.29=29% Probability to be B group is 0.21=21% Probability to be AB group is 0.05 = 5%. What is the probability of next two persons will be 0 group? Is it mutually excluded or independent?

93 Probability rules If the next person has 0 group does not interfere with that the second next person has 0 group, because of this are independent events. Their individual probabilities, are multiplied: 0.45 x 0.45 = = 20.25% In this example, we are using the multiplicative law of probability.

94 Probability rules Example 100 new born in a maternity in Celaya
55 were females and 45 males Probability of to be women was 55/100 =0.55 Probability to be boy was 45/100 = 0.45 What is the probability of the next three deliveries are females?

95 Probability rules Example
They are excluded mutually events, and their individual probabilities are multiplied. 0.55 x 0.55 x 0.55 = = 16.64%

96 Thank you


Download ppt "By Hatim Jaber MD MPH JBCM PhD"

Similar presentations


Ads by Google