Mean, Median and Mode. Lecture 3 - Axioms of Probability. Where do they come from? Graphically. We start with a set of 21 numbers, Sta102 / BME102

Similar documents
Lecture 3 - Axioms of Probability

General Info. Grading

SDS 321: Introduction to Probability and Statistics

Deep Learning for Computer Vision

STAT 430/510 Probability

Statistical Inference

Conditional Probability

Lecture 1 : The Mathematical Theory of Probability

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

Mathematics. ( : Focus on free Education) (Chapter 16) (Probability) (Class XI) Exercise 16.2

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

Introduction Probability. Math 141. Introduction to Probability and Statistics. Albyn Jones

Lecture 4 An Introduction to Stochastic Processes

Lecture Lecture 5

Chapter 6: Probability The Study of Randomness

Fundamentals of Probability CE 311S

Venn Diagrams; Probability Laws. Notes. Set Operations and Relations. Venn Diagram 2.1. Venn Diagrams; Probability Laws. Notes

STAT:5100 (22S:193) Statistical Inference I

LECTURE 1. 1 Introduction. 1.1 Sample spaces and events

ELEG 3143 Probability & Stochastic Process Ch. 1 Experiments, Models, and Probabilities

Probability Pearson Education, Inc. Slide

2. Conditional Probability

Announcements. Topics: To Do:

Probabilistic models

Axioms of Probability

Dept. of Linguistics, Indiana University Fall 2015

CMPSCI 240: Reasoning about Uncertainty

Recitation 2: Probability

ECE 450 Lecture 2. Recall: Pr(A B) = Pr(A) + Pr(B) Pr(A B) in general = Pr(A) + Pr(B) if A and B are m.e. Lecture Overview

Chapter 2. Conditional Probability and Independence. 2.1 Conditional Probability

CS626 Data Analysis and Simulation

Lecture 3 Probability Basics

Introduction to Probability

Econ 325: Introduction to Empirical Economics

Chapter 2. Conditional Probability and Independence. 2.1 Conditional Probability

18.600: Lecture 3 What is probability?

CS4705. Probability Review and Naïve Bayes. Slides from Dragomir Radev

CSC Discrete Math I, Spring Discrete Probability

What is Probability? Probability. Sample Spaces and Events. Simple Event

Probability- describes the pattern of chance outcomes

Quantitative Methods for Decision Making

Part (A): Review of Probability [Statistics I revision]

Events A and B are said to be independent if the occurrence of A does not affect the probability of B.

(i) Given that a student is female, what is the probability of having a GPA of at least 3.0?

Probability: Terminology and Examples Class 2, Jeremy Orloff and Jonathan Bloom

TA Qinru Shi: Based on poll result, the first Programming Boot Camp will be: this Sunday 5 Feb, 7-8pm Gates 114.

Key Concepts. Key Concepts. Event Relations. Event Relations

UNIT 5 ~ Probability: What Are the Chances? 1

Review of Probabilities and Basic Statistics

Business Statistics MBA Pokhara University

I - Probability. What is Probability? the chance of an event occuring. 1classical probability. 2empirical probability. 3subjective probability

Probability COMP 245 STATISTICS. Dr N A Heard. 1 Sample Spaces and Events Sample Spaces Events Combinations of Events...

the time it takes until a radioactive substance undergoes a decay

EE 178 Lecture Notes 0 Course Introduction. About EE178. About Probability. Course Goals. Course Topics. Lecture Notes EE 178

Chapter 2 PROBABILITY SAMPLE SPACE

Single Maths B: Introduction to Probability

Basic Statistics and Probability Chapter 3: Probability

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

6.2 Introduction to Probability. The Deal. Possible outcomes: STAT1010 Intro to probability. Definitions. Terms: What are the chances of?

Basic Probability. Introduction

Probability Review I

MODULE 2 RANDOM VARIABLE AND ITS DISTRIBUTION LECTURES DISTRIBUTION FUNCTION AND ITS PROPERTIES

AMS7: WEEK 2. CLASS 2

STAT Chapter 3: Probability

Important Concepts Read Chapter 2. Experiments. Phenomena. Probability Models. Unpredictable in detail. Examples

Statistical Theory 1

PERMUTATIONS, COMBINATIONS AND DISCRETE PROBABILITY

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

Uncertainty. Russell & Norvig Chapter 13.

Information Science 2

Introduction to Probability and Sample Spaces

Independence. CS 109 Lecture 5 April 6th, 2016

Chapter 1 (Basic Probability)

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

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

Probability Theory and Applications


MATH 556: PROBABILITY PRIMER

4 Lecture 4 Notes: Introduction to Probability. Probability Rules. Independence and Conditional Probability. Bayes Theorem. Risk and Odds Ratio

Example: Suppose we toss a quarter and observe whether it falls heads or tails, recording the result as 1 for heads and 0 for tails.

Conditional Probability & Independence. Conditional Probabilities

Term Definition Example Random Phenomena

Introduction to Probability. Ariel Yadin. Lecture 1. We begin with an example [this is known as Bertrand s paradox]. *** Nov.

Conditional Probability and Bayes Theorem (2.4) Independence (2.5)

Probability 1 (MATH 11300) lecture slides

Lecture 1. ABC of Probability

STAT509: Probability

Probability. VCE Maths Methods - Unit 2 - Probability

Chapter 14. From Randomness to Probability. Copyright 2012, 2008, 2005 Pearson Education, Inc.

Brief Review of Probability

n How to represent uncertainty in knowledge? n Which action to choose under uncertainty? q Assume the car does not have a flat tire

AP Statistics Ch 6 Probability: The Study of Randomness

Conditional Probability

STA Module 4 Probability Concepts. Rev.F08 1

ECE 302: Chapter 02 Probability Model

Lecture 2: Probability. Readings: Sections Statistical Inference: drawing conclusions about the population based on a sample

Conditional Probability & Independence. Conditional Probabilities

Probability & Random Variables

3.2 Probability Rules

ECE 340 Probabilistic Methods in Engineering M/W 3-4:15. Lecture 2: Random Experiments. Prof. Vince Calhoun

Transcription:

Mean, Median and Mode Lecture 3 - Axioms of Probability Sta102 / BME102 Colin Rundel September 1, 2014 We start with a set of 21 numbers, ## [1] -2.2-1.6-1.0-0.5-0.4-0.3-0.2 0.1 0.1 0.2 0.4 ## [12] 0.4 0.5 0.7 0.7 0.7 0.9 1.2 1.2 1.7 1.8 and calculate the mean, median, and mode: mean(x) ## [1] 0.2095 median(x) ## [1] 0.4 Mode(x) ## [1] 0.7 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 2 / 26 Graphically Where do they come from? Imagine we didn t know about the mean, median, or mode - how should we choose a single number s that best summarizes a set of numbers (data)? Frequency 0 1 2 3 4 5 6 7 mean median mode 2 1 0 1 2 There are a couple of different ways we could think about doing this by defining different discrepancy functions L 0 = i L 1 = i L 2 = i x i s 0 assume, n 0 = x i s 1 x i s 2 { 0 if n=0 1 otherwise we want to find the values of s that minimizes L 0, L 1, L 2 for any given data set x. Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 3 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 4 / 26

Minimizing L 0 Minimizing L 1 L 0 = i x i s 0 L 1 = i x i s 1 L0 18.0 19.0 20.0 21.0 L1 15 20 25 30 35 1.5 1.0 0.5 0.0 0.5 1.0 1.5 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 5 / 26 s 1.5 1.0 0.5 0.0 0.5 1.0 1.5 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 6 / 26 s Minimizing L 2 What have we learned? L 2 = i x i s 2 L 0, L 1, and L 2 are examples of what we call loss functions. These come up all the time in higher level statistics. What we have just seen is that: L2 20 30 40 50 60 70 80 L 0 is minimized when s is the mode. L 1 is minimized when s is the median. L 2 is minimized when s is the mean. 1.5 1.0 0.5 0.0 0.5 1.0 1.5 s Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 7 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 8 / 26

s s What does it mean to say that: The probability of rolling snake eyes is P(S) = 1/36? The probability of flipping a coin and getting heads is P(H) = 1/2? The probability Apple s stock price goes up today is P(+) = 3/4? Interpretations: Symmetry: If there are k equally-likely outcomes, each has P(E) = 1/k Frequency: If you can repeat an experiment indefinitely, #E P(E) = lim n n Belief: If you are indifferent between winning $1 if E occurs or winning $1 if you draw a blue chip from a box with 100 p blue chips, rest red, P(E) = p Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 9 / 26 Terminology Outcome space (Ω) - set of all possible outcomes (ω). : 3 coin tosses {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT} One die roll {1,2,3,4,5,6} Sum of two rolls {2,3,...,11,12} Seconds waiting for bus [0, ) Event (E) - subset of Ω (E Ω) that might happen, or might not : 2 heads {HHT, HTH, THH} Roll an even number {2,4,6} Wait < 2 minutes [0, 120) Random Variable (X ) - a value that depends somehow on chance : # of heads {3, 2, 2, 1, 2, 1, 1, 0} # flips until heads {3, 2, 1, 1, 0, 0, 0, 0} 2ˆdie {2, 4, 8, 16, 32, 64} Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 10 / 26 s Set Operations and s (Kolmogorov axioms) Intersection Union Complement Disjoint E and F, EF, E F E or F, E F not E, E c E F = 1 P(E) 0 2 P(Ω) = P(ω 1 or ω 2 or or ω n ) = 1 Difference E\F = E and F c Symmetric Difference E F = (E and F c ) or (E c and F ) 3 P(E or F ) = P(E) + P(F ) if E and F are disjoint, i.e. P(E and F ) = 0 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 11 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 12 / 26

Useful Identities Useful Identities (cont) Complement Rule: Commutativity & Associativity: Difference Rule: P(not A) = P(A c ) = 1 P(A) A or B = B or A (A or B) or C = A or (B or C) A and B = B and A (A and B) and C = A and (B and C) Inclusion-Exclusion: P(B and A c ) = P(B) P(A) if A B P(A B) = P(A) + P(B) P(A and B) (A or B) and C = (A and C) or (B and C) *Think of union as addition and intersection as multiplication: (A + B) C = AC + BC DeMorgan s Rules: not (A and B) = (not A) or (not B) not (A or B) = (not A) and (not B) Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 13 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 14 / 26 Generalized Inclusion-Exclusion Equally Likely Outcomes P( n E i ) = P(E i ) P(E i E j ) + i=1 i n i<j n For the case of n = 3: i<j<k n P(E i E j E k )... + ( 1) n+1 P(E 1... E n ) P(A B C) = P(A) + P(B) + P(C) P(A B) P(A C) P(B C) + P(A B C) Notation: P(E) = #(E) #(Ω) = 1 #(Ω) i 1 ωi E Cardinality - #(S) = number of elements in set S { 1 if x S Indicator function - 1 x S = 0 if x / S Probability of rolling an even number with a six sided die? Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 15 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 16 / 26

Roulette This is the probability an event will occur when another event is known to have already occurred. With equally likely outcomes we define the probability of A given B as P(A B) = #(A B) #(B) (the proportion of outcomes in B that are also in A) Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 17 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 18 / 26, cont. We can rewrite the counting definition of conditional probability as #(A B) P(A B) = #(B) #(A B)/#(Ω) = #(B)/#(Ω) P(A B) = P(B) which is the general definition of conditional probability. Note that P(A B) is undefined if P(B) = 0. Useful Rules Very often we may know the probability of events and their conditional probabilities but not probabilities of the events together, in which case we can use Multiplication rule: P(A B) = P(A B)P(B) Other cases where we do not have the probability of one of the events, we can use Rule of total probability: For a partition B 1,..., B n of Ω, with B i B j = for all i j. P(A) = P(A B 1 ) + P(A B 2 ) +... + P(A B n ) = P(A B 1 )P(B 1 ) +... + P(A B n )P(B n ) Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 19 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 20 / 26

Example - Hiking A quick example of the application of the rule of total probability: Independence We defined events A and B to be independent when Whether or not I go hiking depends on the weather, if it is sunny there is a 60% chance I will go for a hike, while there is only a 10% chance if it is raining and a 30% chance if it is snowing. The weather forecast for tomorrow calls for 50% chance of sunshine, 40% chance of rain, and a 10% chance of snow. which also implies that P(A B) = P(A)P(B) P(A B) = P(A) P(B A) = P(B) What is the probability I go for a hike tomorrow? This should not to be confused with disjoint (mutually exclusive) events where P(A B) = 0 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 21 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 22 / 26 Example - Eye and hair color Example - Circuit Reliability If the probability that C 1 will fail in the next week is 0.2, the probability C 2 will fail is 0.4, and component failure is independent which circuit configuration is more reliable? (has greater probability of being functional next week) Series: 1 Are brown and black hair disjoint? 2 Are brown and black hair independent? 3 Are brown eyes and red hair disjoint? 4 Are brown eyes and red hair independent? Parallel: Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 23 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 24 / 26

Bayes Rule Expands on the definition of conditional probability to give a relationship between P(B A) and P(A B) P(B A) = P(A B)P(B) P(A) In the case where P(A) is not known we can extend this using the law of total probability P(B A) = P(A B)P(B) P(A B)P(B) + P(A B c )P(B c ) Example - House If you ve ever watched the TV show House on Fox, you know that Dr. House regularly states, It s never lupus. Lupus is a medical phenomenon where antibodies that are supposed to attack foreign cells to prevent infections instead see plasma proteins as foreign bodies, leading to a high risk of blood clotting. It is believed that 2% of the population suffer from this disease. The test for lupus is very accurate if the person actually has lupus, however is very inaccurate if the person does not. More specifically, the test is 98% accurate if a person actually has the disease. The test is 74% accurate if a person does not have the disease. Is Dr. House correct even if someone tests positive for Lupus? Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 25 / 26 Sta102 / BME102 (Colin Rundel) Lecture 3 - Axioms of Probability September 1, 2014 26 / 26