Probability Calculus

Similar documents
Lecture 3: Probability

Lecture 3. Probability and elements of combinatorics

MAT2377. Ali Karimnezhad. Version September 9, Ali Karimnezhad

University of Technology, Building and Construction Engineering Department (Undergraduate study) PROBABILITY THEORY

Combinatorics and probability

4/17/2012. NE ( ) # of ways an event can happen NS ( ) # of events in the sample space

1 Preliminaries Sample Space and Events Interpretation of Probability... 13

Lecture 3 : Probability II. Jonathan Marchini

STAT Chapter 3: Probability

Probability deals with modeling of random phenomena (phenomena or experiments whose outcomes may vary)

MS-A0504 First course in probability and statistics

Statistics 1L03 - Midterm #2 Review

Probabilistic models

Lecture Slides. Elementary Statistics Tenth Edition. by Mario F. Triola. and the Triola Statistics Series. Slide 1

Topic 4 Probability. Terminology. Sample Space and Event

Lecture 4: Probability and Discrete Random Variables

Combinatorics. But there are some standard techniques. That s what we ll be studying.

2.6 Tools for Counting sample points

CMPSCI 240: Reasoning about Uncertainty

STT When trying to evaluate the likelihood of random events we are using following wording.

1 Probability Theory. 1.1 Introduction

UNIT Explain about the partition of a sampling space theorem?

Lecture Slides. Elementary Statistics Eleventh Edition. by Mario F. Triola. and the Triola Statistics Series 4.1-1

1 The Basic Counting Principles

Probabilistic models

2011 Pearson Education, Inc

Set Notation and Axioms of Probability NOT NOT X = X = X'' = X

Chapter Goals. To introduce you to data collection

KDF2C QUANTITATIVE TECHNIQUES FOR BUSINESSDECISION. Unit : I - V

Lecture Notes 1 Basic Probability. Elements of Probability. Conditional probability. Sequential Calculation of Probability

Topic 3: Introduction to Probability

The possible experimental outcomes: 1, 2, 3, 4, 5, 6 (Experimental outcomes are also known as sample points)

Chapter Learning Objectives. Random Experiments Dfiii Definition: Dfiii Definition:

F71SM STATISTICAL METHODS

HW MATH425/525 Lecture Notes 1

Sign test. Josemari Sarasola - Gizapedia. Statistics for Business. Josemari Sarasola - Gizapedia Sign test 1 / 13

Probability 1 (MATH 11300) lecture slides

Axioms of Probability. Set Theory. M. Bremer. Math Spring 2018

Data Processing Techniques

10.1. Randomness and Probability. Investigation: Flip a Coin EXAMPLE A CONDENSED LESSON

Lecture 8: Conditional probability I: definition, independence, the tree method, sampling, chain rule for independent events

Introduction to Probability with MATLAB Spring 2014

STA Module 4 Probability Concepts. Rev.F08 1

MATH 556: PROBABILITY PRIMER

To Find the Product of Monomials. ax m bx n abx m n. Let s look at an example in which we multiply two monomials. (3x 2 y)(2x 3 y 5 )

Chapter 2 PROBABILITY SAMPLE SPACE

Chapter 1. Probability

1 What is the area model for multiplication?

Lecture 10: Everything Else

Fundamentals of Probability CE 311S

Discrete Probability

P(A) = Definitions. Overview. P - denotes a probability. A, B, and C - denote specific events. P (A) - Chapter 3 Probability

Combinatorial Analysis

Statistical Theory 1

Information Science 2

Statistics for Business and Economics

3 PROBABILITY TOPICS

Topic -2. Probability. Larson & Farber, Elementary Statistics: Picturing the World, 3e 1

Chance, too, which seems to rush along with slack reins, is bridled and governed by law (Boethius, ).

BASICS OF PROBABILITY CHAPTER-1 CS6015-LINEAR ALGEBRA AND RANDOM PROCESSES

1. Basics of Information

Lecture 1. Chapter 1. (Part I) Material Covered in This Lecture: Chapter 1, Chapter 2 ( ). 1. What is Statistics?

Slide 1 Math 1520, Lecture 21

With Question/Answer Animations. Chapter 7

Topic 2 Probability. Basic probability Conditional probability and independence Bayes rule Basic reliability

LING 473: Day 3. START THE RECORDING Assignment 1 Review Probability. University of Washington Linguistics 473: Computational Linguistics Fundamentals

Discrete Probability. Chemistry & Physics. Medicine

Introduction to Probability Theory, Algebra, and Set Theory

Chapter 5 : Probability. Exercise Sheet. SHilal. 1 P a g e

STAT 201 Chapter 5. Probability

Notes. Combinatorics. Combinatorics II. Notes. Notes. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry. Spring 2006

Properties of Probability

Formalizing Probability. Choosing the Sample Space. Probability Measures

Chapter 15. Probability Rules! Copyright 2012, 2008, 2005 Pearson Education, Inc.

Probability and distributions. Francesco Corona

324 Stat Lecture Notes (1) Probability

Chapter 26: Comparing Counts (Chi Square)

1. When applied to an affected person, the test comes up positive in 90% of cases, and negative in 10% (these are called false negatives ).

Set theory background for probability

A Event has occurred

Lecture 8: Probability

BHP BILLITON UNIVERSITY OF MELBOURNE SCHOOL MATHEMATICS COMPETITION, 2003: INTERMEDIATE DIVISION

CIVL 7012/8012. Basic Laws and Axioms of Probability

P (E) = P (A 1 )P (A 2 )... P (A n ).

CIVL Why are we studying probability and statistics? Learning Objectives. Basic Laws and Axioms of Probability

Sample Space: Specify all possible outcomes from an experiment. Event: Specify a particular outcome or combination of outcomes.

Topic 2 Multiple events, conditioning, and independence, I. 2.1 Two or more events on the same sample space

Math 140 Introductory Statistics

MATH2206 Prob Stat/20.Jan Weekly Review 1-2

STAT 302 Introduction to Probability Learning Outcomes. Textbook: A First Course in Probability by Sheldon Ross, 8 th ed.

Probability- describes the pattern of chance outcomes

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Note 14

Math 140 Introductory Statistics

Probability Problems for Group 3(Due by EOC Mar. 6)

7.1 What is it and why should we care?

CHAPTER 4. Probability is used in inference statistics as a tool to make statement for population from sample information.

Objectives. CHAPTER 5 Probability and Probability Distributions. Counting Rules. Counting Rules

Essential Statistics Chapter 4

Module 8 Probability

STAT509: Probability

Transcription:

Probability Calculus Josemari Sarasola Statistics for Business Gizapedia Josemari Sarasola Probability Calculus 1 / 39

Combinatorics What is combinatorics? Before learning to calculate probabilities, we must learn to count. Combinatorics is the collection of mathematical methods to count in complex problems. Question: how many subsets of 2 elements can we create from a set of 4 elements (a,b,c,d)? Josemari Sarasola Probability Calculus 2 / 39

Combinatorics Ways to count In order to give an answer to the previous question, we must specify which subsets of 2 elements are really different: If we account the order and don t accept repetitions, we have 12 pairs: ab-ac-ad-bc-bd-cd-ba-ca-da-cb-db-dc. These are variations without repetition. If we account the order and do accept repetitions, we have 16 pairs: add aa-bb-cc-dd to the previous pairs. These are variations with repetition. If we don t consider the order and don t accept repetitions, we have 6 pairs: ab-ac-ad-bc-bd-cd. These are combinations. If we don t consider the order and accept repetitions, we have 10 pairs: add aa-bb-cc-dd to the previous pairs. These are multicombinations. Josemari Sarasola Probability Calculus 3 / 39

Combinatorics Combinatorial formulas In the general problem, we have to choose a subset of k elements from a main set of size n. These are the general formulas to count in the ways we have previously given: Variations without repetition (also called k-permutations of n): Vn k n! = (n k)! Variations with repetition : V Rn k = n k ( ) n Combinations: Cn k n! = = k k!(n k)! ( ) n + k 1 Multicombinations: Mn k = k Exercise: Apply these formulas in order to calculate the results in the previous slide. Josemari Sarasola Probability Calculus 4 / 39

Combinatorics Combinations: properties ( ) n = 1 0 ( ) n = n 1 ( ) ( ) n n = n k k ( ) n Shortcut: in order to calculate, multiply n in a k decreasing way just the number of times shown by number ( ) 7 k, and divide it by k!. E.g.: = 7 6 5 = 35. 3 3! Josemari Sarasola Probability Calculus 5 / 39

Combinatorics Another way to count: permutations In other problems we want just to arrange n elements in different orders. Each of these ordered sequences is called a permutation. The number of permutations of n elements is P n = n! E.g.: a-b-c elements are ordered in 3!=6 ways: abc, acb, bac, bca, cab, cba. Josemari Sarasola Probability Calculus 6 / 39

Combinatorics Permutations with repetition But the previous formula doesn t work when some of the elements are repeated (e.g, with a-a-b elements). In those cases, we must apply the formula for permutations with repetition (α, β: number of repetitions): P R α,β,... n = n! α!β!... E.g.: a-a-b elements are ordered in 3!/2!1!=3 ways: aab, aba, baa. Josemari Sarasola Probability Calculus 7 / 39

Probability Probability: definition and interpretation Probability: measure of uncertainty of a random event. E.g.: the probability of raining in a day in August in Donostia is 0.2 (or 20%) Interpretation: in the long term, around in 20% of the days in August it will rain. Josemari Sarasola Probability Calculus 8 / 39

Probability Basic methods to calculate probability Laplace s rule Frequential interpretation Subjective probability Josemari Sarasola Probability Calculus 9 / 39

Probability Laplace s rule number of outcomes resulting into A P (A) = total number of outcomes Example: Probability of getting odd after throwing a dice: P [odd] = {1, 3, 5} {1, 2, 3, 4, 5, 6} = 0.5 BUT, all possible outcomes must be EQUIPROBABLE (with the same chances to happen) to apply this rule. Example: Can we apply the rule for the probability of raining tomorrow? When we apply Laplace s rule, we often must use combinatorial formulas, in order to count the number of possible outcomes. Josemari Sarasola Probability Calculus 10 / 39

Probability Frequential interpretation Example: how to calculate the probability for an abstract new student to pass the statistics exam? According to Laplace s rule, it will 0.5, as there are two outcomes: passsing and not passing. BUT, we cannot take those two outcomes as the were EQUIPROBABLE. So, what can we do? Compile data from the past or make some experiments. Example: We give an exam to 200 new students, and 160 (frequency for passing) of them passed. So: P [passing] = 160 200 = 0.8 Josemari Sarasola Probability Calculus 11 / 39

Probability Frequential interpretation: remarks Experiments and data must be homogeneous, that is, always with the same conditions (don t pass the same exam in different days!) It can be expensive and difficult to undertake (experiments in nuclear plants, ummm!) The result is an estimation, but a big number of experiments will give us a small error almost surely. Josemari Sarasola Probability Calculus 12 / 39

Probability Subjective probability Example: What is the probability of you (yes, you) passing the statistics exam? We cannot carry out experiments with you, beacause as you make exams you are better in statistics. So, it s impossible to repeat the same conditions. Solution: take into account all personal factors about learning, understanding and studying (Are you clever? Did you understand the course? Do you regularly study?) and according to the results, make a a subjective estimation of the probability. Another examples: probability of inflation rising next year, probability of sales increasing next year, probability of Euskal Herria being independent from Spain in the next ten years. Josemari Sarasola Probability Calculus 13 / 39

Probability: event algebra Event algebra We have learned how to calculate probability of simple events. But how to calculate the probability of combined events? And, how to combine events? So, now we are going to learn event algebra. First concept: sample space or universe, named Ω, the set of possible outcomes of a random process. Example, afther throwing a dice: Ω = {1, 2, 3, 4, 6} or Ω = {odd, even}. We usually depict the sample space by means of a Venn diagram: 2 4 6 1 3 5 Ω Josemari Sarasola Probability Calculus 14 / 39

Probability: event algebra Complementary events The complementary event of any A event is the event that happens when A doesn t occur. We write it A Example: about gender, man and woman. Depiction: A A Figure: A eta A are complementary events. Ω Basic rule for complementary events: P [A] = 1 P [A] Josemari Sarasola Probability Calculus 15 / 39

Probability: event algebra Mutually exclusive events Two events are mutually exclusive if they can t occur at the same time. Depiction: A B X Y Ω Ω Figure: A eta B (on the left) are not mutually exclusive. X eta Y (on the right) are mutually exclusive. Example: Man and using tampons are mutually exclusive, bu man and vegetarian are not. Exercise: Are complementary events mutually exclusive? And inversely? Josemari Sarasola Probability Calculus 16 / 39

Probability: event algebra Intersection of events The intersection of two events A and B, denoted by A B, is the event that happens when both A and B happen at the same time. Depiction: A B Figure: A B (gray): The intersection of A and B events Ω Exercise: How is the intersection of two complementary events? And what is its probability? Josemari Sarasola Probability Calculus 17 / 39

Probability: event algebra Union of events The union of two events A and B, denoted by A B, is the event that happens when at least one of those events happen. Depiction: A B Figure: A B (gray): The union of A and B events Ω When A 1, A 2,..., A n are mutually exclusive, here is how we calculate the probability of the their union: P (A 1 A 2... A n ) = P (A 1 ) + P (A 2 ) +... + P (A n ) Josemari Sarasola Probability Calculus 18 / 39

Probability: event algebra Substraction of events The substraction of B event from A event, denoted by A B, is the event that happens when A happens but B not. Depiction: A B A B A B Ω Figure: A B: A happens but B not and B A: B happens but A not. Josemari Sarasola Probability Calculus 19 / 39

Probability: event algebra Events as subsets of other events A is a subset of B event, denoted by A B, if whenever A happens, B also happens. Depiction: B A Ω Figure: A B: A is a subset of B. If A is subset of B, what is A B? And A B? Josemari Sarasola Probability Calculus 20 / 39

Probability: event algebra De Morgan s laws A B = A B A B = A B Josemari Sarasola Probability Calculus 21 / 39

Probability: event algebra Inclusion-exclusion principle We apply the inclusion-exclusion principle to calculate the probability of the union of events For A and B events: P (A B) = P (A) + P (B) P (A B) For, A, B and C events: P (A B C) =P (A) + P (B) + P (C) P (A B) P (A C) P (B C) + P (A B C) Josemari Sarasola Probability Calculus 22 / 39

Probability: event algebra Inclusion-exclusion principle For A 1, A 2, A 3,..., A n events: P (A 1 A 2 A 3... A n ) = P (A 1 ) + P (A 2 ) + P (A 3 ) +... + P (A n ) P (A 1 A 2 ) P (A 1 A 3 )... P (A n 1 A n ) +P (A 1 A 2 A 3 ) +... + P (A n 2 A n 1 A n ) P (A 1 A 2 A 3 A 4 )... +... So we must add all simple events, substract all double events, add all triple events, substract all quadruple events, and so on, till reaching the whole set of events. Josemari Sarasola Probability Calculus 23 / 39

Probability: event algebra Inclusion-exclusion principle When all events are mutually esclusive, all their possibl intersections are empty, so the inclusion-exclusion principle gives the rule we already know: P (A 1 A 2... A n ) = P (A 1 ) + P (A 2 ) +... + P (A n ) So whenever events are mutually exclusive, we calculate the probability of their union by just adding their simple probabilities. Josemari Sarasola Probability Calculus 24 / 39

Product of probabilities Conditional probability We denote P (B/A) the conditional probability of B given A, that is, the probability of B provided (under the condition) that A has occurred: P (B/A) = P (A B) P (A) A:Ω B Figure: If A has occurred, sample space narrows to A event. In that new universe, the probability of B, that is P (B/A), is the domain that B event takes into the domain of A, that is P (A B), but restricted to P (A). Josemari Sarasola Probability Calculus 25 / 39

Probability: product of probabilities Chain rule Also named general product rule, it gives the probability of the intersection of two or more events. For two events: P (A B) = P (A) P (B/A) For n events: P (A 1 A 2 A 3... A n ) = P (A 1 ) P (A 2 /A 1 ) P (A 3 /A 1 A 2 )... P (A n /A 1 A 2 A 3... A n 1 ) When events are given in a chronological order, as usual, the application of the rule is much easier when we follow that order by multiplying the probabilities. Josemari Sarasola Probability Calculus 26 / 39

Probability: product of probabilities Chain rule: example We have made a survey among Basque young people aged 18-30: Are you vegan? Total Sex Yes No Male 25 20 45 Female 40 15 55 Total 65 35 100 1 If you are a woman, what is the probability of being vegan? Answer: 2 We select randomly a Basque young, what is the probability of being a vegan male? Answer: Josemari Sarasola Probability Calculus 27 / 39

Probability: product of probabilities Dependence and independence We say A and B are independent events, when knowing that one of them has happened (or not) doesn t give any information about the probability of the other one: P (A B) = P (A) P (B/A) = P (A) P (B) On the other side, if the occurence of one of the events gives information about the other(s), those events are dependent. Josemari Sarasola Probability Calculus 28 / 39

Probability: product of probabilities Dependence: sampling without devolution Example: In an urn, we have 6 faultless and 4 faulty items. We select randomly two items without devolution. What is the probability of both of them being faultless? P [1o 2o] = P [1o] P [2o/1o] = 6 10 5 9 So, sampling without devolution implies dependence, as number of items changes as we extract the elements in the population. Josemari Sarasola Probability Calculus 29 / 39

Probability: product of probabilities Dependence: sampling with devolution Example: In an urn, we have 6 faultless and 4 faulty items. We select randomly two items with devolution. What is the probability of both of them being faultless? P [1o 2o] = P [1o] P [2o] = 6 10 6 10 We can see probability doesn t change as we select items. No matter which are the selected elements, probability remains always constant. So, sampling with devolution implies independence, as the population remains always unchanged. Josemari Sarasola Probability Calculus 30 / 39

Probability: product of probabilities Probability trees Example: In an urn, we have 6 faultless and 4 faulty items. We select randomly two items without devolution. What is the probability of the second one being faulty? It depends: If the first item is faulty: 3/9. If the first item is faultless, 4/9. Provided we know nothing about the first item, the answer will be between the two previous values, weighted by the probabilities of the first item being faulty and faultless: P (2x) = P [(1o 2x) (1x 2x)] = P (1o) P (2x/1o) + P (1x) P (2x/1x) = 6 10 4 9 + 4 10 3 9 Josemari Sarasola Probability Calculus 31 / 39

Probability: product of probabilities Probability trees Graphically it s easier: 1 : o P (1:o)=6/10 Start P (2:x/1:o)=4/9 2 : x P (1:x)=4/10 1 : x P (2:x/1:x)=3/9 2 : x Josemari Sarasola Probability Calculus 32 / 39

Probability: product of probabilities Probability trees We have just to follow the path in order to reach the event we want, multiplying probabilities into the path; adding probabilities of different paths. 6 10 4 9 + 4 10 3 9 Some basic rules: We have to calculate each probability assumed that previous events have happened. The probabilities following a node or switch must add to 1, except at the last one, that is, except when we reach to the desired probability. Josemari Sarasola Probability Calculus 33 / 39

Probability: product of probabilities Probability trees Probability trees are useful in these situations: When the solution to a probability problem is it depends on. In that case we switch to the different possibilities. When we have a chronology: a sequence of events over time. In that case, we follow the paths in the chronologic order. Probability trees are the rule-of-thumb version of the law of total probability: P (A) = P (A/B n )P (B n ) n Josemari Sarasola Probability Calculus 34 / 39

Probability: Bayes theorem Bayes theorem: example In an urn we have 8 faultless and 3 faulty items. We sent a piece randomly to a customer. After that, we inspected an item and we saw it was faulty. What is the probability of the first one being faulty? B: 2nd faulty A i P (A i ) P (B/A i ) P (A i ) P (B/A i ) P (A i /B) 1st faulty 3/11=0.27 2/10=0.2 0.054 0.199 1st faultless 8/11=0.73 3/10=0.3 0.219 0.801 1 0.273 1 Josemari Sarasola Probability Calculus 35 / 39

Probability: Bayes theorem Bayes theorem: some clues The goal of the Bayes theorem is to adjust the probability of an event according to an information we have got. The probabilities before knowing the information are P (A i ) and we call them a priori (previous) probabilities. The adjusted probabilities according to the known facts (P (A i /B)) are called a posteriori (following) probabilities, denoting by B the information we get and use to adjust a priori probabilities. The verosimilities are the probabilities of the information we get known that each of the A i events has occurred: P (B/A i ) Most often data in a Bayes problem are the a priori probabilities and verosimilities (first three columns) and the goal is to calculate the a posteriori probabilites. The sum of both a priori and a posteriori probabilities is always 1 (they represent the probabilites of everything that may happen). Josemari Sarasola Probability Calculus 36 / 39

Probability: Bayes theorem Bayes theorem: returning to the example We want to know the probability of the 1st piece being faulty, so we set P (A) as faulty and faultless (everything that may happen). We set verosimilities: if the 1st item is faulty (faultless) what is the probability of the 2nd one being faulty (the information we get). The following steps are all mechanical, leading us to the a posteriori probabilites, 1st faulty and 1st faultless but taking b into acconut this time. As the 2nd piece was faulty, intuitively it s clear that the probability of the 1st piece being also faulty must be lower (0.27 0.199). Josemari Sarasola Probability Calculus 37 / 39

Probability: introduction to statistical testing Example: Planet Nine 2016: astronomers Mike Brown and Konstantin Batygin inferred the existence of a large planet beyond Neptune: the Planet Nine. Set a hypothesis that can be assumed (H 0 ): there s no planet beyond Neptune (let s be cautious: we have not detected anything!). Evidence: Brown and Batygin found orbits of some TNOs (Trans Neptunian Objects) were clustered. Statistical testing: probability of that clustering is very small provided H 0. By contrast that clustering is likely if Planet Nine exists. Conclusion: we may accept the hypothesis of the Planet Nine. But it remains always a hypothesis! Josemari Sarasola Probability Calculus 38 / 39

Probability: introduction to statistical testing Statistical testing: steps Goal: take a decision about if a hypothesis is true or not, according to evidence. First step: set a null hypothesis (the statement we accept as a matter of principle, with caution and without any other evidence), denoted by H 0. Calculate the probability of the evidence, provided that H 0 is true. If the probability of the evidence (called p-value) is very low, we conclude that it s strange that the evidence happened provided that H 0 is true, so we reject H 0. Otherwise (when the p-value is not low enough) we must think the evidence is a normal fact under H 0, so we must accept H 0. How do we know p-value is low or not low enough? We set at the beginning (in order to be neutral) the significance level, denoted by α. It s a low enough probability; usually 0.01, 0.05 or 0.10. So, if p value < α, we reject H 0 ; otherwise we accept it. Josemari Sarasola Probability Calculus 39 / 39