Probability theory and average-case complexity. Review of probability theory.

Slides:



Advertisements
Similar presentations
Beginning Probability
Advertisements

6.1 Simulation Probability is the branch of math that describes the pattern of chance outcomes It is an idealization based on imagining what would happen.
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.
AP Statistics Section 6.2C Independent Events & The Multiplication Rule.
Get out your ISN! You will be able to understand the basic ideas of probability including outcomes, events, and sample spaces. Today’s Objectives:
Probability Predictions Ch. 1, Act. 5. Probability The study of random events. Random events are things that happen without predictability – e.g. the.
How likely something is to happen.
Mathematics in Today's World
Math notebook, pencil, and possibly calculator. Definitions  An outcome is the result of a single trial of an experiment.  The sample space of an experiment.
Describing Probability
MAT 103 Probability In this chapter, we will study the topic of probability which is used in many different areas including insurance, science, marketing,
Probability Sample Space Diagrams.
AP Statistics Section 6.2 A Probability Models
Exercises (1) 1. In the usual dice experiment, let A, B and C, be the following events: A = {1,7,6} and B = {1,2,7,5} and C = {3,5} Find the following:
EXAMPLE 1 Construct a probability distribution
EXAMPLE 1 Construct a probability distribution Let X be a random variable that represents the sum when two six-sided dice are rolled. Make a table and.
Statistics Lecture 7. Last day: Completed Chapter 2 Today: Discrete probability distributions Assignment 3: Chapter 2: 44, 50, 60, 68, 74, 86, 110.
Section The Idea of Probability Statistics.
Information Theory and Security
What are the chances of that happening?. What is probability? The mathematical expression of the chances that a particular event or outcome will happen.
Probability.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
Sets, Combinatorics, Probability, and Number Theory Mathematical Structures for Computer Science Chapter 3 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesProbability.
1 9/8/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
CSCE 2100: Computing Foundations 1 Probability Theory Tamara Schneider Summer 2013.
1 9/23/2015 MATH 224 – Discrete Mathematics Basic finite probability is given by the formula, where |E| is the number of events and |S| is the total number.
Probability Distributions - Discrete Random Variables Outcomes and Events.
The probability that it rains is 70% The probability that it does NOT rain is 30% Instinct tells us that for any event E, the probability that E happens.
Level34567 Probability Skills I can use the probability words impossible, certain and even chance to describe the probability of an event occurring. I.
The Practice of Statistics
4.1 Probability Distributions. Do you remember? Relative Frequency Histogram.
Introduction to Behavioral Statistics Probability, The Binomial Distribution and the Normal Curve.
Copyright © Cengage Learning. All rights reserved. 8.6 Probability.
The Wonderful World… of Probability. When do we use Probability?
5.1 Probability in our Daily Lives.  Which of these list is a “random” list of results when flipping a fair coin 10 times?  A) T H T H T H T H T H 
POSC 202A: Lecture 4 Probability. We begin with the basics of probability and then move on to expected value. Understanding probability is important because.
Analysis of Algorithms CS 477/677 Instructor: Monica Nicolescu Lecture 7.
How likely is it that…..?. The Law of Large Numbers says that the more times you repeat an experiment the closer the relative frequency of an event will.
Basic Concepts of Probability
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.
Do Now. Introduction to Probability Objective: find the probability of an event Homework: Probability Worksheet.
What is the probability of two or more independent events occurring?
PROBABILITY What is the probability of flipping a head? There is a 1 in 2 chance – ½ = 0.5.
Warm Up: Quick Write Which is more likely, flipping exactly 3 heads in 10 coin flips or flipping exactly 4 heads in 5 coin flips ?
No Warm-Up today. You have a Quiz Clear your desk of everything but a calculator and something to write with.
Counting Techniques (Dr. Monticino). Overview  Why counting?  Counting techniques  Multiplication principle  Permutation  Combination  Examples.
Probability theory and average-case complexity. Review of probability theory.
When could two experimental probabilities be equal? Question of the day.
Warm Up 1. Gretchen is making dinner. She has tofu, chicken and beef for an entrée, and French fries, salad and corn for a side. If Ingrid has 6 drinks.
Warm Up 1. Ingrid is making dinner. She has tofu, chicken and beef for an entrée, and French fries, salad and corn for a side. If Ingrid has 6 drinks to.
AP STATISTICS LESSON AP STATISTICS LESSON PROBABILITY MODELS.
Theory of Computational Complexity Probability and Computing Ryosuke Sasanuma Iwama and Ito lab M1.
Introduction to probability (3) Definition: - The probability of an event A is the sum of the weights of all sample point in A therefore If A1,A2,…..,An.
Discrete Math Section 16.1 Find the sample space and probability of multiple events The probability of an event is determined empirically if it is based.
Conditional Probability 423/what-is-your-favorite-data-analysis-cartoon 1.
PROBABILITY AND COMPUTING RANDOMIZED ALGORITHMS AND PROBABILISTIC ANALYSIS CHAPTER 1 IWAMA and ITO Lab. M1 Sakaidani Hikaru 1.
Introduction to Discrete Probability
Warm Up 1. Gretchen is making dinner. She has tofu, chicken and beef for an entrée, and French fries, salad and corn for a side. If Ingrid has 6 drinks.
PROBABILITY The probability of an event is a value that describes the chance or likelihood that the event will happen or that the event will end with.
Chapter 17 Thinking about Chance.
PROBABILITY.
Warm Up Which of the following are combinations?
Intro to Probability.
10.1 Notes: Theoretical and experimental probability
Probability.
Probability Notes Please fill in the blanks on your notes to complete them. Please keep all notes throughout the entire week and unit for use on the quizzes.
Calculating Probabilities
CSE 321 Discrete Structures
Lecture 2 Basic Concepts on Probability (Section 0.2)
Sets, Combinatorics, Probability, and Number Theory
Presentation transcript:

Probability theory and average-case complexity

Review of probability theory

Review of probability theory: outcome Examples: – Rolling a die and getting 1 – Rolling a die and getting 6 – Flipping three coins and getting H, H, T – Drawing two cards and getting 7 of hearts, 9 of clubs NOT examples: – Rolling a 6-sided die and getting an even number (this is more than one outcome—3 to be exact!) – Drawing a card and getting an ace (4 outcomes!)

Review of probability theory: event Defn: one or more possible outcomes Examples: – Rolling a die and getting 1 – Rolling a die and getting an even number – Flipping three coins and getting at least 2 “heads” – Drawing five cards and getting one of each suit

Review of probability theory: sample space Defn: A set of events Examples: Flipping 3 coins Rolling 2 dice Drawing a card

Review of probability theory: probability distribution Flipping 3 biased coins 75% heads, 25% tails * * * * * * * *0.75

Review of probability theory: probability of an event A

Review of probability theory: random variable Idea: turn events into numbers Let S be a sample space Defn: mapping from events to real numbers Example: X = the number on a die after a roll event “rolling a 1” -> 1 event “rolling a 2” -> 2 … event “rolling a 6” -> 6 Technically, X is a function, so we can write: X(rolling a 1) = 1 X(rolling a 2) = 2 … X(rolling a 6) = 6 Technically, X is a function, so we can write: X(rolling a 1) = 1 X(rolling a 2) = 2 … X(rolling a 6) = 6

Review of probability theory: expected value of a random variable Here, x = X(event)

Expected running time of an algorithm

Let A be an algorithm. Let S n be the sample space of all inputs of size n. To talk about expected (/average) running time, we must specify how we measure running time. – We want to turn each input into a number (runtime). – Random variables do that… We must also specify how likely each input is. – We do this by specifying a probability distribution over S n.

Expected running time of an algorithm

Example time!

Example time: searching an array Let L be an array containing 8 distinct keys Search(k, L[1..8]): for i = 1..8 if L[i].key == k then return true return false What should our sample space S 9 of inputs be? Hard to reason about all possible inputs. – (In fact, there are uncountably infinitely many!) Can group inputs by how many steps they take!

Grouping inputs by how long they take Search(k, L[1..8]): for i = 1..8 if L[i].key == k then return true return false What causes us to return in loop iteration 1? How about iteration 2? 3? … 8? After loop? S 9 = {k in L[1], k in L[2], …, k in L[8], k not in L} Now we need a random variable for S 9 !

Using a random variable to capture running time For simplicity: assume each iteration takes 2 steps. 1 step Do we have enough information to compute an answer?

What about a probability distribution?

Computing the average running time

The final answer