25
CS6825: CS6825: Probability Probability An Introduction An Introduction

CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Embed Size (px)

Citation preview

Page 1: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

CS6825: ProbabilityCS6825: Probability

An IntroductionAn Introduction

Page 2: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

DefinitionsDefinitions

An An experimentexperiment is the process of observing is the process of observing a phenomenon with multiple possible a phenomenon with multiple possible outcomesoutcomes

The The sample spacesample space of an experiment is of an experiment is allall possible outcomespossible outcomes• The sample space may be The sample space may be discretediscrete or or

continuouscontinuous An An eventevent is a set (collection) of one or is a set (collection) of one or

more outcomes in the sample spacemore outcomes in the sample space

Page 3: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Presenting dataPresenting data Pie and bar chartsPie and bar charts

Frequency diagramFrequency diagram

Scatter diagramScatter diagram

Taken fromTaken from““Multidimensional Multidimensional Representation of Concepts Representation of Concepts as Cognitive Engrams in the as Cognitive Engrams in the Human Brain “Human Brain “

Body Pixels

Background

Face Pixels

Other

Page 4: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Pie chartPie chart A Pie Chart is useful for presenting nominal A Pie Chart is useful for presenting nominal

data.data.• For each category we calculate the relative For each category we calculate the relative

frequency of its occurrence.frequency of its occurrence.• Then we take a circle and divide (slice) it Then we take a circle and divide (slice) it

proportionally to the relative frequency and portions proportionally to the relative frequency and portions of the circle are allocated for the different groupsof the circle are allocated for the different groups

Body Pixels

Background

Face Pixels

Other

Page 5: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

ExampleExample A manager of Athletics store has to decide, A manager of Athletics store has to decide,

which brands to keep in the new season. 200 which brands to keep in the new season. 200 runners were asked to indicate their favorite runners were asked to indicate their favorite type of running shoe.type of running shoe.

Type of shoe # of runners % of total

Nike 92 46.0

Adidas 49 24.5

Reebok 37 18.5

Asics 13 6.5

Other 9 4.5

Page 6: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Example: Pie chart for running Example: Pie chart for running shoesshoes

46%

24.50%

18.50%6.50%

4.50% Nike

Adidas

ReebokAsics

Other

We can express this in words by saying the probability of Nike is 46% and the probability of Reebok is 18.5%

Page 7: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

The The probabilityprobability of an of an event is the proportion of event is the proportion of

times the event is times the event is expected to occur in expected to occur in

repeated experimentsrepeated experiments

Page 8: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Probability PropertiesProbability Properties The probability of an event, say event A, is denoted P(A).The probability of an event, say event A, is denoted P(A). All probabilities are between 0 and 1.All probabilities are between 0 and 1.

(i.e. 0 < P(A) < 1)(i.e. 0 < P(A) < 1) Sample Space – set of all possible events. In previous Sample Space – set of all possible events. In previous

example Set = {Nike, Adidas, Reebok, Asic, Other} example Set = {Nike, Adidas, Reebok, Asic, Other}

The sum of the probabilities of all possible outcomes The sum of the probabilities of all possible outcomes (sample space) must be 1.(sample space) must be 1.

NOTE: it is possible to us a scale of 100% instead of 1 but, NOTE: it is possible to us a scale of 100% instead of 1 but, in statistics we use the scale of 1.in statistics we use the scale of 1.

Page 9: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

What are the ProbabilitiesWhat are the Probabilities

46%

24.50%

18.50%6.50%

4.50% Nike

Adidas

ReebokAsics

Other

P(Nike) = 46/100 = .46P(Adidas) = 24.5/100 = .245P(Reebok) = 18.5/100 = .185P(Asics) = 6.5/100 = .065P(Other) = 4.5/100 = .045

Page 10: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Assigning ProbabilitiesAssigning Probabilities

Guess based on prior knowledge Guess based on prior knowledge alonealone

Guess based on knowledge of Guess based on knowledge of probability distribution (to be probability distribution (to be discussed later)discussed later)

Assume equally likely outcomesAssume equally likely outcomes Use relative frequenciesUse relative frequencies

Page 11: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Guess based on prior Guess based on prior knowledge aloneknowledge alone

Event B = {It rains Tomorrow}Event B = {It rains Tomorrow}

Weth R. Guy says “There is a Weth R. Guy says “There is a 30% chance of rain 30% chance of rain

tomorrow.”tomorrow.”

P(B) = .30P(B) = .30

a priori Knowledge

Page 12: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

What do to when no prior What do to when no prior knowledge and no training knowledge and no training

data …..Assume equally likely data …..Assume equally likely outcomesoutcomes

Page 13: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Use Relative FrequenciesUse Relative Frequencies

Gather Gather training datatraining data to estimate to estimate probabilities….Flip a coin how probabilities….Flip a coin how many times get head versus many times get head versus tails.tails.

i.e. Take a bunch of images of the i.e. Take a bunch of images of the data and see what it means to data and see what it means to be yellow for a banana?be yellow for a banana?

Page 14: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Additional material….Additional material….

Beyond the very beginningBeyond the very beginning

Page 15: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Complement*Complement*

The The complementcomplement of an event A, of an event A, denoted by A, is the set of denoted by A, is the set of outcomes that are not in Aoutcomes that are not in A

A A meansmeans A A does not occurdoes not occur

* Some texts use Ac to denote the complement of A

Page 16: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Law of ComplementLaw of Complement

P(A) = P(A) = Probability of anyProbability of any event except A occurringevent except A occurring

= P(all Events) - P(A)= P(all Events) - P(A) = = Sum(all events i P(i))Sum(all events i P(i)) – P(A)– P(A) = 1 – P(A)= 1 – P(A)

Page 17: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

UnionUnion

The The unionunion of two events A and B, of two events A and B, denoted by A denoted by A UU B, is the set of B, is the set of outcomes that are in A, or B, or outcomes that are in A, or B, or

bothboth

IfIf A A UU B B occurs, then either occurs, then either AA or or BB or or both occurboth occur

Page 18: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Intersection

The intersection of two events A and B, denoted by AB, is the set of outcomes that

are in both A and B.

If AB occurs, then both A and B occur

Page 19: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Addition LawAddition Law

P(A U B) = P(A) + P(B) - P(AB)P(A U B) = P(A) + P(B) - P(AB)

(The probability of the union of A (The probability of the union of A and B is the probability of A plus and B is the probability of A plus

the probability of B minus the the probability of B minus the probability of the intersection of A probability of the intersection of A

and B) and B)

Page 20: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Mutually Exclusive Mutually Exclusive Events*Events*

Two events are Two events are mutually mutually exclusiveexclusive if their if their

intersection is empty.intersection is empty.

Two events, A and B, are Two events, A and B, are mutually exclusive if and mutually exclusive if and

only if P(AB) = 0only if P(AB) = 0

Page 21: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Addition Law for Addition Law for Mutually Exclusive Mutually Exclusive

EventsEventsP(A U B) = P(A) + P(B)P(A U B) = P(A) + P(B)

Page 22: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Conditional ProbabilityConditional Probability

The probability of event A occurring, The probability of event A occurring, given that event B has occurred, is given that event B has occurred, is called the called the conditional probability of conditional probability of event A given event Bevent A given event B, denoted , denoted P(A|P(A|

B)B)

Page 23: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

Conditional ProbabilityConditional Probability

P(AB)P(AB)P(A|B) = --------P(A|B) = -------- P(B)P(B)

oror

P(AB) = P(B)P(A|B)P(AB) = P(B)P(A|B)

Page 24: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

IndependenceIndependence

IfIf

P(A|B) = P(A)P(A|B) = P(A)

oror

P(B|A) = P(B)P(B|A) = P(B)

oror

P(AB) = P(A)P(B)P(AB) = P(A)P(B)

then A and B are then A and B are independentindependent..

Page 25: CS6825: Probability An Introduction Definitions An experiment is the process of observing a phenomenon with multiple possible outcomes An experiment

IndependenceIndependenceTwo events A and B are Two events A and B are

independent independent ifif

P(A|B) = P(A)P(A|B) = P(A)

oror

P(B|A) = P(B)P(B|A) = P(B)

oror

P(AB) = P(A)P(B)P(AB) = P(A)P(B)NOTE: this is an assumption sometimes researchers make about theirsystems when they have no a priori knowledge to tell them differently.They do it as it makes math simpler. BE CAREFUL, it may be a WRONGAssumption!!!i.e. in motion tracking – person 1 leaves means nothing about person 2leaving. They are independent….. But, is this true in practice?