Mean, Median and Mode. Lecture 2 - Introduction to Probability. Where do they come from? We start with a set of 21 numbers, Statistics 102

Similar documents
CHAPTER 10: Introducing Probability

Lecture 6 Probability

Lesson 97 - Binomial Distributions IBHL2 - SANTOWSKI

Opening Exercise: Lesson 91 - Binomial Distributions IBHL2 - SANTOWSKI

Probability mass function; cumulative distribution function

Event p351 An event is an outcome or a set of outcomes of a random phenomenon. That is, an event is a subset of the sample space.

Statistical Methods for NLP LT 2202

HHH HHT HTH THH HTT THT TTH TTT

Probability and Sample space

6.1 Discrete and Continuous Random Variables. 6.1A Discrete random Variables, Mean (Expected Value) of a Discrete Random Variable

Lecture 3. Sample spaces, events, probability

STAT 430/510 Probability Lecture 5: Conditional Probability and Bayes Rule

The Elements of Probability and Statistics

Chapter 14. From Randomness to Probability. Copyright 2010 Pearson Education, Inc.

ECON 214 Elements of Statistics for Economists 2016/2017

Part V - Chance Variability

Conditional Probability. Expected Value.

Theoretical Foundations

Math 14 Lecture Notes Ch Mean

Stochastic Calculus, Application of Real Analysis in Finance

CHAPTER 6 Random Variables

Chapter 6: Probability: What are the Chances?

Assignment 2 (Solution) Probability and Statistics

The Binomial distribution

Chapter 8 Solutions Page 1 of 15 CHAPTER 8 EXERCISE SOLUTIONS

Chapter 7. Random Variables

Chapter 4. Section 4.1 Objectives. Random Variables. Random Variables. Chapter 4: Probability Distributions

Stat 211 Week Five. The Binomial Distribution

The binomial distribution

Mathematical Statistics İST2011 PROBABILITY THEORY (3) DEU, DEPARTMENT OF STATISTICS MATHEMATICAL STATISTICS SUMMER SEMESTER, 2017.

Econ 6900: Statistical Problems. Instructor: Yogesh Uppal

Random Variables. 6.1 Discrete and Continuous Random Variables. Probability Distribution. Discrete Random Variables. Chapter 6, Section 1

N(A) P (A) = lim. N(A) =N, we have P (A) = 1.

Statistics for IT Managers

Marquette University MATH 1700 Class 8 Copyright 2018 by D.B. Rowe

Sec$on 6.1: Discrete and Con.nuous Random Variables. Tuesday, November 14 th, 2017

Probability & Sampling The Practice of Statistics 4e Mostly Chpts 5 7

MANAGEMENT PRINCIPLES AND STATISTICS (252 BE)

Examples: On a menu, there are 5 appetizers, 10 entrees, 6 desserts, and 4 beverages. How many possible dinners are there?

Chapter 4. Probability Lecture 1 Sections: Fundamentals of Probability

Lecture 9. Probability Distributions. Outline. Outline

7.1: Sets. What is a set? What is the empty set? When are two sets equal? What is set builder notation? What is the universal set?

Lecture 9. Probability Distributions

I can use simulation to model chance behavior. I can describe a probability model for a chance process. I can use basic probability rules, including

Chapter 5 Basic Probability

Probability and Expected Utility

Keeping Your Options Open: An Introduction to Pricing Options

WorkSHEET 13.3 Probability III Name:

(c) The probability that a randomly selected driver having a California drivers license

MATH 112 Section 7.3: Understanding Chance

EDO UNIVERSITY, IYAMHO EDO STATE, NIGERIA

MATH 446/546 Homework 1:

Chapter 6: Random Variables

Chapter 5: Probability

FE 5204 Stochastic Differential Equations

Experimental Probability - probability measured by performing an experiment for a number of n trials and recording the number of outcomes

300 total 50 left handed right handed = 250

MA 1125 Lecture 14 - Expected Values. Wednesday, October 4, Objectives: Introduce expected values.

Math141_Fall_2012 ( Business Mathematics 1) Weeks 11 & 12. Dr. Marco A. Roque Sol Department of Mathematics Texas A&M University

Probability is the tool used for anticipating what the distribution of data should look like under a given model.

Prof. Thistleton MAT 505 Introduction to Probability Lecture 3

Statistics for Business and Economics: Random Variables (1)

X = x p(x) 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6 1 / 6. x = 1 x = 2 x = 3 x = 4 x = 5 x = 6 values for the random variable X

Probability Distributions for Discrete RV

Mathacle. PSet Stats, Concepts In Statistics Level Number Name: Date: Distribution Distribute in anyway but normal

NMAI059 Probability and Statistics Exercise assignments and supplementary examples October 21, 2017

Binomial population distribution X ~ B(

***SECTION 8.1*** The Binomial Distributions

Probability and Statistics. Copyright Cengage Learning. All rights reserved.

Shifting our focus. We were studying statistics (data, displays, sampling...) The next few lectures focus on probability (randomness) Why?

Unit 2: Probability and distributions Lecture 1: Probability and conditional probability

Chapter Six Probability

PROBABILITY AND STATISTICS, A16, TEST 1

Probability Distributions

184 Chapter Not binomial: Because the student receives instruction after incorrect answers, her probability of success is likely to increase.

Module 4: Probability

SOA Exam P. Study Manual. 2nd Edition. With StudyPlus + Abraham Weishaus, Ph.D., F.S.A., CFA, M.A.A.A. NO RETURN IF OPENED

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

PROBABILITY and BAYES THEOREM

+ Chapter 7. Random Variables. Chapter 7: Random Variables 2/26/2015. Transforming and Combining Random Variables

Stat 20: Intro to Probability and Statistics

Probability Distributions

Continuous distributions. Lecture 6: Probability. Probabilities from continuous distributions. From histograms to continuous distributions

PRACTICE PROBLEMS CHAPTERS 14 & 15

Random variables. Discrete random variables. Continuous random variables.

6.1 Binomial Theorem

Counting Basics. Venn diagrams

Statistical Methods in Practice STAT/MATH 3379

1. You roll a six sided die two times. What is the probability that you do not get a three on either roll? 5/6 * 5/6 = 25/36.694

12. THE BINOMIAL DISTRIBUTION

12. THE BINOMIAL DISTRIBUTION

Fall 2015 Math 141:505 Exam 3 Form A

Probability Basics. Part 1: What is Probability? INFO-1301, Quantitative Reasoning 1 University of Colorado Boulder. March 1, 2017 Prof.

Math 235 Final Exam Practice test. Name

SOA Exam P. Study Manual. 2nd Edition, Second Printing. With StudyPlus + Abraham Weishaus, Ph.D., F.S.A., CFA, M.A.A.A. NO RETURN IF OPENED

Language Models Review: 1-28

MATH/STAT 3360, Probability FALL 2013 Toby Kenney

Statistical patterns. Business Statistics Spring 2017

Chapter CHAPTER 4. Basic Probability. Assessing Probability. Example of a priori probability

Test - Sections 11-13

Transcription:

Mean, Median and Mode Lecture 2 - Statistics 102 Colin Rundel January 15, 2013 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.6 0.7 0.7 0.9 1.2 1.2 1.7 1.8 mean(x) ## [1] 0.2048 median(x) ## [1] 0.4 Mode(x) ## [1] 0.1 0.4 0.7 1.2 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 2 / 26 Where do they come from? Frequency 0 1 2 3 4 5 6 2 1 0 1 2 Imagine we didn t know about the mean, median, or mode - how can should we choose a single number s that best represents a set of numbers? 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. Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 3 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 4 / 26

Minimizing L 0 Minimizing L 1 L 0 = i x i s 0 L 1 = i x i s 1 L0 19.0 19.5 20.0 20.5 21.0 L1 15 20 25 30 35 1.5 1.0 0.5 0.0 0.5 1.0 1.5 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 5 / 26 s 1.5 1.0 0.5 0.0 0.5 1.0 1.5 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 7 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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} Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 11 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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) Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 13 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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? Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 15 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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) Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 17 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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 Ω, P(A) = P(A B 1 )P(B 1 ) +... + P(A B n )P(B n ) Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 19 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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 rain. What is the probability I go for a hike tomorrow? which also implies that P(A B) = P(A)P(B) P(A B) = P(A) P(B A) = P(B) This should not to be confused with disjoint (mutually exclusive) events where P(A B) = 0 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 21 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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: Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 23 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 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? Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 25 / 26 Statistics 102 (Colin Rundel) Lecture 2 - January 15, 2013 26 / 26