Algorithms CSCI 235, Fall 2017 Lecture 10 Probability II

Slides:



Advertisements
Similar presentations
Discrete Random Variables To understand what we mean by a discrete random variable To understand that the total sample space adds up to 1 To understand.
Advertisements

Random Variables & Probability Distributions The probability of someone laughing at you is proportional to the stupidity of your actions.
Lecture Discrete Probability. 5.2 Recap Sample space: space of all possible outcomes. Event: subset of of S. p(s) : probability of element s of.
1 Press Ctrl-A ©G Dear2009 – Not to be sold/Free to use Tree Diagrams Stage 6 - Year 12 General Mathematic (HSC)
Random variables Random experiment outcome numerical measure/aspect of outcome Random variable S outcome R number Random variable.
CHAPTER 6: RANDOM VARIABLES AND EXPECTATION
Probability Distributions: Finite Random Variables.
1 Algorithms CSCI 235, Fall 2012 Lecture 9 Probability.
14/6/1435 lecture 10 Lecture 9. The probability distribution for the discrete variable Satify the following conditions P(x)>= 0 for all x.
Lecture 1 Sec
Random Variable. Random variable A random variable χ is a function (rule) that assigns a number to each outcome of a chance experiment. A function χ acts.
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
22C:19 Discrete Structures Discrete Probability Spring 2014 Sukumar Ghosh.
Random Variables an important concept in probability.
Probability Distributions
Random Variables Learn how to characterize the pattern of the distribution of values that a random variable may have, and how to use the pattern to find.
12.1/12.2 Probability Quick Vocab: Random experiment: “random” act, no way of knowing ahead of time Outcome: results of a random experiment Event: a.
Random Variables Probability distribution functions Expected values.
Chapter 3 Section 3.7 Independence. Independent Events Two events A and B are called independent if the chance of one occurring does not change if the.
Discrete Math Section 16.3 Use the Binomial Probability theorem to find the probability of a given outcome on repeated independent trials. Flip a coin.
Math 145 September 18, Terminologies in Probability  Experiment – Any process that produces an outcome that cannot be predicted with certainty.
Statistics October 6, Random Variable – A random variable is a variable whose value is a numerical outcome of a random phenomenon. – A random variable.
Binomial Probability Theorem In a rainy season, there is 60% chance that it will rain on a particular day. What is the probability that there will exactly.
Lecture 21 Dr. MUMTAZ AHMED MTH 161: Introduction To Statistics.
Discrete Random Variable Random Process. The Notion of A Random Variable We expect some measurement or numerical attribute of the outcome of a random.
Lesson 10: Using Simulation to Estimate a Probability Simulation is a procedure that will allow you to answer questions about real problems by running.
Terminologies in Probability
Math 145 October 5, 2010.
Random Variables.
Math 145 June 9, 2009.
PROBABILITY AND PROBABILITY RULES
22C:19 Discrete Math Discrete Probability
UNIT 8 Discrete Probability Distributions
CS104:Discrete Structures
Discrete and Continuous Random Variables
Math 145 September 25, 2006.
Conditional Probability
Math 145.
Chapter 9 Section 1 Probability Review.
Warm Up Which of the following are combinations?
Terminologies in Probability
Math 145 February 22, 2016.
Statistical Inference for Managers
Terminologies in Probability
King Saud University Women Students
Terminologies in Probability
Random Variable Two Types:
CHAPTER 6 Random Variables
Random Variables and Probability Distributions
Math 145 September 4, 2011.
Terminologies in Probability
Math 145 February 26, 2013.
Math 145 June 11, 2014.
Discrete & Continuous Random Variables
©G Dear 2009 – Not to be sold/Free to use
Math 145 September 29, 2008.
Math 145 June 8, 2010.
Section 1 – Discrete and Continuous Random Variables
Algorithms CSCI 235, Spring 2019 Lecture 10 Probability II
Math 145 October 3, 2006.
Math 145 June 26, 2007.
Terminologies in Probability
6.2 Probability Models.
Math 145 February 12, 2008.
Terminologies in Probability
Math 145 September 24, 2014.
Math 145 October 1, 2013.
Math 145 February 24, 2015.
Math 145 July 2, 2012.
Presentation transcript:

Algorithms CSCI 235, Fall 2017 Lecture 10 Probability II

Conditional Probability Conditional probability (having prior knowledge): Probability of A given B = Example: Experiment A with H1 = 1/3, H2 = 1/4, H3 = 1/5 What is the probability of A3 (exactly 2 tails) given A4 (two consecutive flips the same)? A3 = {HTT, THT, TTH} A4 = {HHH, HHT, HTT, THH, TTH, TTT}

Example 2 Ann has 2 children, one of which is a girl. What is the probability that the other child is a boy? (Assume a child is a girl or boy with equal probability) Pr{G} = 1/2 Pr{B} = 1/2

Independence If two events are independent then Probability of A given B = (Knowledge of B does not change the probability of A) Therefore: Definition: Events A and B are independent if

Example of independence Of the four events in experiment A, which are independent? Recall: Event A1: First flip is head = {HHH, HHT, HTH, HTT} Event A2: Second flip is tail = {HTH, HTT, TTH, TTT} Event A3: Exactly 2 tails = {HTT, THT, TTH} Event A4: Two consecutive flips are the same= {HHH, HHT, HTT, THH, TTH, TTT}

Checking for independence 1. Are A1 and A2 independent? Pr{A1}=Pr{HHH} + Pr{HHT} + Pr{HTH} + Pr{HTT} = 1/60 + 1/15 + 1/20 + 1/5 = 20/60 = 1/3 Pr{A2}=Pr{HTH} + Pr{HTT} + Pr{TTH} + Pr{TTT} = 1/20 + 1/5 + 1/10 + 2/5 = 3/4 If A1 and A2 are independent, then = 1/20 + 1/5 = 5/20 = 1/4 Pr{A1}Pr{A2} = (1/3)(3/4) = 1/4 Yes. They are independent. 2. Are A1 and A3 independent? (We will work this out in class)

Discrete Random Variables A discrete random variable maps (assigns) a real number to each element (outcome) of a sample space, S. Example: h(x) = number of heads in outcome x r(x) = length of longest run in outcome x Outcome(x) h(x) r(x) H1H2H3 3 3 H1H2T3 2 2 H1T2H3 2 1 H1T2T3 1 2 T1H2H3 2 2 T1H2T3 1 1 T1T2H3 1 2 T1T2T3 0 3

The Pre-Image The pre-image of a value, v, under a discrete random variable f is defined as: In other words: the pre-image of v under f is the set of all outcomes for which the value of f(x) = v. Example: h-1(1) = {HTT, THT, TTH} r-1(3) = ?

The probability density function The probability density function (PDF) of a discrete random variable is defined as follows: In other words: The probability density function of f for a value, v, is the sum of the probabilities of all the outcomes in the pre-image of v under f. Example: PDF(h) = ? (PDF(h))(0) = Pr{h-1(0)} = Pr{TTT} = ? (PDF(h))(1) = Pr{h-1(1)} = Pr{HTT, THT, TTH}=?

Independence of discrete random variables Discrete random variables f and g are independent if, for all v and w, f-1(v) and g-1(w) are independent. Example: Are h and r independent? Test for v = 0, w = 1: is h-1(0) independent of r-1(1)? h-1(0) = {TTT} r-1(1) = {THT, HTH}

Expected Value The expected value, E(f), of a discrete random variable, f, is a weighted average: Example: What is the expected number of heads in Experiment A? = 0(Pr{h-1(0)} + 1(Pr{h-1(1)} + 2(Pr{h-1(2)} + 3(Pr{h-1(3)} = 13/30 + 2(9/60) + 3/60 = 47/60

Example 2 What is the expected number of flips in Experiment B (flip until heads)? Assume a fair coin. Outcome b H 1 b-1(1) = H TH 2 b-1(2) = TH TTH 3 b-1(3) = TTH ... ... ... Pr{b-1(1)} = Pr{H} = 1/2 Pr{b-1(2)} = Pr{TH} = (1/2)(1/2) = 1/4 Pr{b-1(3)} = Pr{TTH} = (1/2)(1/2)(1/2) = 1/8 Pr{b-1(k)} = (1/2)k E(b) = ?