SI485i : NLP Day 2 Probability Review. Introduction to Probability Experiment (trial) Repeatable procedure with well-defined possible outcomes Outcome.

Slides:



Advertisements
Similar presentations
Copyright © 2010, 2007, 2004 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
Advertisements

0 0 Review Probability Axioms –Non-negativity P(A)≥0 –Additivity P(A U B) =P(A)+ P(B), if A and B are disjoint. –Normalization P(Ω)=1 Independence of two.
1 Chapter 3 Probability 3.1 Terminology 3.2 Assign Probability 3.3 Compound Events 3.4 Conditional Probability 3.5 Rules of Computing Probabilities 3.6.
COUNTING AND PROBABILITY
Chapter Two Probability
1 1 PRESENTED BY E. G. GASCON Introduction to Probability Section 7.3, 7.4, 7.5.
Chapter 7 Probability 7.1 Experiments, Sample Spaces, and Events
Probability and Sampling: Part I. What are the odds? What are the odds of finding a newspaper at the news stand? New York times Village Voice Jerusalem.
4.2 Probability Models. We call a phenomenon random if individual outcomes are uncertain but there is nonetheless a regular distribution of outcomes in.
Probability Probability Principles of EngineeringTM
1 Discrete Math CS 280 Prof. Bart Selman Module Probability --- Part a) Introduction.
Basic Probability. Theoretical versus Empirical Theoretical probabilities are those that can be determined purely on formal or logical grounds, independent.
LING 438/538 Computational Linguistics
LING 438/538 Computational Linguistics Sandiway Fong Lecture 17: 10/24.
Information Theory and Security
Fundamentals of Probability
Chapter 6 Probabilit y Vocabulary Probability – the proportion of times the outcome would occur in a very long series of repetitions (likelihood of an.
Copyright © 2015, 2011, 2008 Pearson Education, Inc. Chapter 7, Unit A, Slide 1 Probability: Living With The Odds 7.
Chapter 4 Probability See.
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.
MATH 3033 based on Dekking et al. A Modern Introduction to Probability and Statistics Slides by Tim Birbeck Instructor Longin Jan Latecki C2: Outcomes,
Chapter 1 Probability and Distributions Math 6203 Fall 2009 Instructor: Ayona Chatterjee.
Conditional Probability and Independence If A and B are events in sample space S and P(B) > 0, then the conditional probability of A given B is denoted.
Nor Fashihah Mohd Noor Institut Matematik Kejuruteraan Universiti Malaysia Perlis ІМ ќ INSTITUT MATEMATIK K E J U R U T E R A A N U N I M A P.
Chapter 1 Probability Spaces 主講人 : 虞台文. Content Sample Spaces and Events Event Operations Probability Spaces Conditional Probabilities Independence of.
CIS 2033 based on Dekking et al. A Modern Introduction to Probability and Statistics Instructor Longin Jan Latecki C2: Outcomes, events, and probability.
Section 7.2. Section Summary Assigning Probabilities Probabilities of Complements and Unions of Events Conditional Probability Independence Bernoulli.
Chapter 16 Probability. Activity Rock-Paper-Scissors Shoot Tournament 1)Pair up and choose one person to be person A and the other person B. 2)Play 9.
November 2004CSA4050: Crash Concepts in Probability1 CSA4050: Advanced Topics in NLP Probability I Experiments/Outcomes/Events Independence/Dependence.
Week 21 Conditional Probability Idea – have performed a chance experiment but don’t know the outcome (ω), but have some partial information (event A) about.
Computing Fundamentals 2 Lecture 6 Probability Lecturer: Patrick Browne
Chapter 2: Probability · An Experiment: is some procedure (or process) that we do and it results in an outcome. A random experiment: is an experiment we.
1 CHAPTERS 14 AND 15 (Intro Stats – 3 edition) PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY.
PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY
Copyright © 2010 Pearson Education, Inc. Unit 4 Chapter 14 From Randomness to Probability.
5.1 Randomness  The Language of Probability  Thinking about Randomness  The Uses of Probability 1.
From Randomness to Probability Chapter 14. Dealing with Random Phenomena A random phenomenon is a situation in which we know what outcomes could happen,
1 CHAPTER 7 PROBABILITY, PROBABILITY RULES, AND CONDITIONAL PROBABILITY.
Sixth lecture Concepts of Probabilities. Random Experiment Can be repeated (theoretically) an infinite number of times Has a well-defined set of possible.
Natural Language Processing Giuseppe Attardi Introduction to Probability IP notice: some slides from: Dan Jurafsky, Jim Martin, Sandiway Fong, Dan Klein.
Basic Concepts of Probability
Independent Events Lesson Starter State in writing whether each of these pairs of events are disjoint. Justify your answer. If the events.
Probability. What is probability? Probability discusses the likelihood or chance of something happening. For instance, -- the probability of it raining.
STT 315 This lecture note is based on Chapter 3
+ Chapter 5 Overview 5.1 Introducing Probability 5.2 Combining Events 5.3 Conditional Probability 5.4 Counting Methods 1.
§2 Frequency and probability 2.1The definitions and properties of frequency and properties.
PROBABILITY AND BAYES THEOREM 1. 2 POPULATION SAMPLE PROBABILITY STATISTICAL INFERENCE.
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 ?
Copyright © 2010 Pearson Education, Inc. Chapter 14 From Randomness to Probability.
PROBABILITY 1. Basic Terminology 2 Probability 3  Probability is the numerical measure of the likelihood that an event will occur  The probability.
AP Statistics From Randomness to Probability Chapter 14.
Conditional Probability 423/what-is-your-favorite-data-analysis-cartoon 1.
Introduction to Discrete Probability
Chapter 4 Probability Concepts
Natural Language Processing
What is Probability? Quantification of uncertainty.
From Randomness to Probability
CSCI 5832 Natural Language Processing
Natural Language Processing
Introduction to Probability
Lecture 11 Sections 5.1 – 5.2 Objectives: Probability
CSCI 5832 Natural Language Processing
COUNTING AND PROBABILITY
Digital Lesson Probability.
I flip a coin two times. What is the sample space?
Lecture 2 Basic Concepts on Probability (Section 0.2)
A random experiment gives rise to possible outcomes, but any particular outcome is uncertain – “random”. For example, tossing a coin… we know H or T will.
Sets, Combinatorics, Probability, and Number Theory
Presentation transcript:

SI485i : NLP Day 2 Probability Review

Introduction to Probability Experiment (trial) Repeatable procedure with well-defined possible outcomes Outcome The result of a single experiment run Sample Space (S) the set of all possible outcomes finite or infinite Example die toss experiment possible outcomes: S = {1,2,3,4,5,6} Some slides from Sandiway Fong

More definitions Events an event is any subset of outcomes from the experiment’s sample space Example die toss experiment let A represent the event such that the outcome of the die toss experiment is divisible by 3 A = {3,6} A is a subset of the sample space S= {1,2,3,4,5,6} Example Draw a card from a deck suppose sample space S = {heart,spade,club,diamond} (four suits) let A represent the event of drawing a heart let B represent the event of drawing a red card A = {heart} B = {heart,diamond}

Introduction to Probability Definition of sample space depends on what we ask Sample Space (S): the set of all possible outcomes Example die toss experiment for whether the number is even or odd possible outcomes: {even,odd} not {1,2,3,4,5,6}

Definition of Probability The probability law assigns to an event a nonnegative number called P(A) Also called the probability of A That encodes our knowledge or belief about the collective likelihood of all the elements of A Probability law must satisfy certain properties

Probability Axioms Nonnegativity P(A) >= 0, for every event A Additivity If A and B are two disjoint events over the same sample space, then the probability of their union satisfies: P(A U B) = P(A) + P(B) Normalization The probability of the entire sample space S is equal to 1, i.e. P(S) = 1.

An example An experiment involving a single coin toss There are two possible outcomes, H and T Sample space S is {H,T} If coin is fair, should assign equal probabilities to 2 outcomes Since they have to sum to 1 P({H}) = 0.5 P({T}) = 0.5 P({H,T}) = P({H})+P({T}) = 1.0

Another example Experiment involving 3 coin tosses Outcome is a 3-long string of H or T S ={HHH,HHT,HTH,HTT,THH,THT,TTH,TTTT} Assume each outcome is equiprobable “Uniform distribution” What is the probability of the event that exactly 2 heads occur? A = {HHT,HTH,THH} P(A) = P({HHT})+P({HTH})+P({THH}) = 1/8 + 1/8 + 1/8 = 3/8

Probability definitions In summary: Probability of drawing a spade from 52 well-shuffled playing cards:

Probabilities of two events P(A and B) = P(A) x P(B | A) P(A and B) = P(B) x P(A | B) If events A and B are independent P(A and B) = P(A) x P(B) A coin is flipped twice What is the probability that it comes up heads both times?

How about non-uniform probabilities? A biased coin, twice as likely to come up tails as heads, P(h) = 1/3 is tossed twice What is the probability that at least one head occurs? Sample space = {hh, ht, th, tt} (h = heads, t = tails) Sample points/probability for the event: ht 1/3 x 2/3 = 2/9hh 1/3 x 1/3= 1/9 th 2/3 x 1/3 = 2/9tt 2/3 x 2/3 = 4/9 Answer: 5/9 =  0.56 (sum of weights in red)

Moving toward language What’s the probability of a random word (from a random dictionary page) being a verb?

Probability and part of speech tags all words = just count all the words in the dictionary # verbs = count the words with verb markers! If a dictionary has 50,000 entries, and 10,000 are verbs…. P(V) is 10000/50000 = 1/5 =.20

Exercise We are interested in P(W) where W = all seen words What is the sample space W? What is P(“my”) and P(“brands”) ? Say I choose two words from the text at random: What is P(“dance” and ”hands”)? I came to dance, dance, dance, dance I hit the floor 'cause that's my plans, plans, plans, plans I'm wearing all my favorite brands, brands, brands, brands Give me some space for both my hands, hands, hands, hands

Conditional Probability A way to reason about the outcome of an experiment based on other known information In a word guessing game the first letter for the word is a “t”. What is the likelihood that the second letter is an “h”? How likely is it that a person has a disease given that a medical test was negative?

More precisely Given an experiment, we know that the outcome is within some given event B We want to quantify the likelihood that the outcome also belongs to some other given event A. We need a new probability law that gives us the conditional probability of A given B P(A|B)

An intuition A = “it’s raining now” P(A) in dry California is 0.01 B = “it was raining ten minutes ago” P(A|B) means “what is the probability of it raining now if it was raining 10 minutes ago” P(A|B) is probably way higher than P(A) Perhaps P(A|B) is.30 Intuition: The knowledge about B should change our estimate of the probability of A.

Conditional Probability Let A and B be events p(A|B) = the probability of event A occurring given event B occurs definition: p(A|B) = p(A  B) / p(B)

Conditional probability ABA,B Note: P(A,B)=P(A|B) · P(B) Also: P(A,B) = P(B,A)

Exercise What is the probability of a word being “live” given that we know the previous word is “and”? P(“live” | “and”) = ??? Now assume each line is a single string: P(“saying ayo” | “throw my hands up in the air sometimes”) = ?? Yeah, yeah 'Cause it goes on and on and on And it goes on and on and on I throw my hands up in the air sometimes Saying ayo Gotta let go I wanna celebrate and live my life Saying ayo Baby, let's go

Independence What if A and B are independent? P(A | B) = P(A) “Knowing B tells us nothing helpful about A.” And since P(A,B) = P(A) x P(B | A) Then P(A,B) = P(A) x P(B) P(heads,tails) = P(heads) x P(tails) =.5 x.5 =.25

Bayes Theorem Swap the conditioning Sometimes easier to estimate one kind of dependence than the other

Deriving Bayes Rule

Summary Probability Conditional Probability Independence Bayes Rule