Mathematics for Computer Science MIT 6.042J/18.062J

Slides:



Advertisements
Similar presentations
Simple Probability and Odds
Advertisements

Rare Events, Probability and Sample Size. Rare Events An event E is rare if its probability is very small, that is, if Pr{E} ≈ 0. Rare events require.
Probability Three basic types of probability: Probability as counting
Dice Games & Probabilities. Thermo & Stat Mech - Spring 2006 Class 16 Dice Games l One die has 6 faces. So, the probabilities associated with a dice game.
The Geometric Distributions Section Starter Fred Funk hits his tee shots straight most of the time. In fact, last year he put 78% of his.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
Independence and Dependence 1 Krishna.V.Palem Kenneth and Audrey Kennedy Professor of Computing Department of Computer Science, Rice University.
Great Theoretical Ideas In Computer Science Steven Rudich, Anupam GuptaCS Spring 2004 Lecture 22April 1, 2004Carnegie Mellon University
AP Statistics: Section 8.2 Geometric Probability.
You are going to work in pairs to produce a Maths board game.
TIMES 3 Technological Integrations in Mathematical Environments and Studies Jacksonville State University 2010.
Great Theoretical Ideas in Computer Science.
Expected Value. Expected Value - Definition The mean (average) of a random variable.
COMPSCI 102 Introduction to Discrete Mathematics.
Binomial Probability Section Starter Here’s a game you will like: Let’s bet a dollar on this proposition: I will roll a fair die once. If.
Geometric Distribution. The geometric distribution computes the probability that the first success of a Bernoulli trial comes on the kth trial. For example,
Examples 1.At City High School, 30% of students have part- time jobs and 25% of students are on the honor roll. What is the probability that a student.
Great Theoretical Ideas in Computer Science for Some.
Great Theoretical Ideas In Computer Science John LaffertyCS Fall 2006 Lecture 10 Sept. 28, 2006Carnegie Mellon University Classics.
Problem: Roll a two dice until you get doubles. How long did you have to wait?
Copyright © 2009 Pearson Education, Inc. Chapter 11 Understanding Randomness.
1 Copyright © 2014, 2012, 2009 Pearson Education, Inc. Chapter 9 Understanding Randomness.
Chapter 8: The Binomial and Geometric Distributions 8.2 – The Geometric Distributions.
Great Theoretical Ideas in Computer Science.
Chapter 12 Lesson 3 Probability. Vocabulary O Probability- A ratio that measures the chances of an event occurring. O Success- The desired outcome of.
Definitions Addition Rule Multiplication Rule Tables
Dice Games & Probabilities
Chapter 6: Discrete Probability
Unit 6 Random Variables.
Introduction to Discrete Mathematics
Sequences, Series, and Probability
Meaning of Probability
The 6 steps of data collection:
Conditional Probability
A way to detect a collision…
Mathematics for Computer Science MIT 6.042J/18.062J
Average Monthly Temperature and Rainfall
Dice Games & Probabilities
Understanding Randomness
Mathematics for Computer Science MIT 6.042J/18.062J
Expected Value.
Chapter 16.
Asymptotics & Stirling’s Approximation
Probabilities and Proportions
Hypothesis Testing and Confidence Intervals
Mathematics for Computer Science MIT 6.042J/18.062J
Great Theoretical Ideas In Computer Science
Binomial Distributions
Proposed Strategic Planning Process for FY 2013/14 thru FY 2015/16
Homework #5 — Monte Carlo Simulation
and Structural Induction
Discrete Distributions
Great Theoretical Ideas In Computer Science
Mathematics for Computer Science MIT 6.042J/18.062J
Mathematics for Computer Science MIT 6.042J/18.062J
Discrete Distributions
Uniform Distributions and Random Variables
The Birthday Paradox June 2012.
and Structural Induction
Mathematics for Computer Science MIT 6.042J/18.062J
Applied Discrete Mathematics Week 12: Discrete Probability
Modeling Discrete Variables
Discrete Distributions.
Discrete Distributions
Day 1 of 2 Skull and Spirit Creature
Skull & Spirit Creature
Modeling Discrete Variables
Chapter 11 Probability.
Sets, Combinatorics, Probability, and Number Theory
Presentation transcript:

Mathematics for Computer Science MIT 6.042J/18.062J Great Expectations Copyright © Radhika Nagpal, 2002. Prof. Albert Meyer & Dr. Radhika Nagpal

Abstractions in Probability Random Variables R(s) = r Probability Distribution Pr (R=r) Expected Value

Expected Value Fortune Telling Average of future values

Definition Expected value of a random variable R

A Simple Example R = value thrown by a dice Expected value of R = 1(1/6) + 2(1/6) + 3 (1/6) + 4(1/6) + 5(1/6) + 6(1/6) = 3.5

Example 2: Space Station Mir Suppose that main computer has a probability p of failing every second When do we expect it to first fail?

Space Station Mir T = time of the first failure E[T] = 1 . Pr (fails on the 1st second, T=1) + 2 . Pr (fails on the on 2nd second, T=2) + 3 . Pr (fails on the 3rd second, T=3) ….

Space Station Mir Pr (fails on the 1st second, T=1) = p Pr (fails on the on 2nd second, T=2) = (1-p) p Pr (fails on the 3rd second, T=3) = (1-p) (1-p) p

Space Station Mir Probability that it fails on ith second Pr (T=i) = (1-p)i-1 p no failures in first i-1 seconds

Space Station Mir similar to geometric series

More About Mir How many times should I expect to roll a fair dice before I get a 6? 6 times Mir contains 10,000 components How many failures do we expect to see per year of operation?

Other Applications Algorithms Gambling Analysis of sorting: given a sequence of n numbers, on average how many numbers are out of order? Gambling Will the Patriots win the Superbowl? How many rounds of 5 card draw do I expect to play before I finally win?

Pitfalls of Expectation Expected value does not tell us the distribution Expected value may never actually occur Model is not Reality

In Class Problems 1 and 2

Example 2: Birthday Problem In a class with 100 people, what is the probability that two people have the same birthday? 99% How many pairs of people with the same birthday do we expect to see?

Actual Data 12 pairs in entire class Dates: Should you expect to see something similar in other classes? Jan 24, Jan 25, Feb 16, Feb 23 Mar 6, Mar 17, Mar 22 Jul 6, Jul 12, Aug 19 Oct 13, Oct 25

Birthday Problem R = number of pairs with same birthday Pr (R = 0) Pr (exactly one pair, R=1) Pr (exactly two pairs, R=2) = ? Starts becoming very messy …

Linearity of Expectation

Birthdays Let Ri = 1 if ith pair has same birthday, = 0 if not Pr (Ri = 1) = 1/365 Pr (Ri = 0) = 1 – (1/365) E[Ri] = 1 (1/365) = 1/365 = 1/Y

Expected Number of Birthday Pairs E[# of Pairs] = E[R1] + E[R2] + E[R3]…. = (n choose 2) . E[Ri] = n2 / 2Y ~ 14 pairs for 6.042

The Same Question N wireless devices randomly pick identifiers from a range R. How many identifier collisions do you expect to see?

The Same Question N wireless devices randomly pick identifiers from a range R. How many identifier collisions do you expect to see? = N2 / 2R

Experiment: The Hat Check Game: Everyone puts there name in a hat, then each person randomly draws out a name. How many people expect to get their own name back? Collect stats per table