Basic probability Concepts and its application By Khubaib Raza

20
Explain Something Different. PROBABILITY

Transcript of Basic probability Concepts and its application By Khubaib Raza

Page 1: Basic probability Concepts and its application By Khubaib Raza

Explain Something Different.PROBABILITY

Page 2: Basic probability Concepts and its application By Khubaib Raza

Meet Our TeamStudent of Government College University

BSCS E2

Yaseen Saleem

Ahtsham Naseer

Roll-no 280 Roll-no 262 Roll-no 256 Roll-no 210Roll-n0 232

Suleman Khan

Ali Ahsan

Khubaib Raza

Page 3: Basic probability Concepts and its application By Khubaib Raza

Today LearnAttention Must require

Introduction

Probability and its Examples

Probability and its Properties

Difference between Probability and Permutation

Application in Computer Science

Page 4: Basic probability Concepts and its application By Khubaib Raza

INTRODUCTION

The theory of probability was first developed in the seventeenth century when certain gambling games were analyzed by the French mathematician Blaise Pascal. It was in these studies that Pascal discovered various properties of Probability. In the eighteenth century, the French mathematician Laplace, who also studied gambling, gave definition of the probability as the number of successful outcomes divided by the number of total outcomes. (Real life Example).

Page 5: Basic probability Concepts and its application By Khubaib Raza

Sample space and Event

An experiment is a procedure that yields a given set of possible outcomes.

The sample space of the experiment is the set of possible outcomes

An event is a subset of the sample space.

Before we start Probability understand this Concpet

Page 6: Basic probability Concepts and its application By Khubaib Raza

Event and Sample Spaces

Sample SpaceThe sample space is the set of all possible outcomes.

Simple EventsThe individual outcomes are called simple events.

EventAn event is any collectionof one or more simple events

Page 7: Basic probability Concepts and its application By Khubaib Raza

EXAMPLE

Solution:P(heads) = 1/2

P(tails) = 1/2

Property:

If you add these two up, you will get 1, which means the answers are probably right.

If I flip a coin,

what is the probability I get heads?

What is the probability I get tails?

Remember, to think of how many possibilities there are.

Page 8: Basic probability Concepts and its application By Khubaib Raza

EXAMPLE

When a die is tossed the sample space S of the experiment have the following six outcomes. S = {1, 2, 3, 4, 5, 6}

Let E1 be the event that an even number occurs, E2 be the event that an odd number occurs, Then,E1 = {2, 4, 6} E2 = {1, 3, 5}

What are the total possible outcomes if a dice is rolled?

Page 9: Basic probability Concepts and its application By Khubaib Raza

ProbabilityThe possibility of an event to occur in a sample space is known as Probability.Let S be a finite sample space such that all the outcomes are equally likely to occur. EXAMPLE: What is the probability of getting a number greater than 4 when a dice is tossed?

SOLUTION:When a dice is rolled its sample space is S={1,2,3,4,5,6}

Let E be the event that a number greater than 4 occurs.Then, E = {5, 6}Hence, possibility that number will be greater than 4 is,Probability=1/3

Page 10: Basic probability Concepts and its application By Khubaib Raza

ProbabilityProperties of Probability

• Probability is never negative• Probability is never more than one.• Probability always lies between 0 and 1• Probability of impossible event is always equals to 0• Probability of sure event is always equals to 1• Sum of probability is always equal to 1 (p=1).• Let p=Probability of interested events q=Probability of uninterested events Then, p+q=1

Page 11: Basic probability Concepts and its application By Khubaib Raza

EXERCISE

SOLUTION:

i) There are four Ace’s in a deck of cards(as ace’s are 4 in 52 cards);

ii) There are two red Kings in a deck of cards(as two red King cards are there);

One card is drawn at random from an ordinary deck of 52 cards.

Find the probability p that

(i) It is Ace (ii) It is Red King

131

524

drawn becan cards waysofnumber Totaldrawn becan sace' waysofNumber

p

261

522

drawn becan cards waysofnumber Totaldrawn becan Kings Red waysofNumber

p

Page 12: Basic probability Concepts and its application By Khubaib Raza

EXAMPLE

Solution:• Since there are four red balls and five blue balls so if we take out one ball from the box

then there is possibility that it may be one of from four red and one of from five blue balls hence there are total of nine possibilities. Thus we have

• The total number of possible outcomes = 4 + 5 = 9• Now our favorable event is that we get the blue ball when we choose a ball from the box.

So we have• The total number of favorable outcomes = 5• Now we have Favorable outcomes 5 and our sample space has total outcomes 9 .Thus we

have • The probability that a ball chosen = 5/9

An box contains four red and five blue balls. What is the probability that a ball chosen from the box is blue?

Page 13: Basic probability Concepts and its application By Khubaib Raza

EXAMPLE

SOLUTION:The possible outcomes of this experiment are red, green, blue and yellow.

Total = 6+5+8+3 = 22

P(Red) = No. of ways to chose red/Total Marbles = 6/22 = 3/11

P(Green) = No. of ways to chose green/Total Marbles = 5/22

P(Blue) = No. of ways to chose blue/Total Marbles = 8/22 = 4/11

P(Yellow) = No. of ways to chose yellow/Total Marbles = 3/22

A glass jar contains 6 red, 5 green, 8 blue and 3 yellow marbles. If a single marble is chosen at random from the jar, what is the probability of choosing a red marble? a green marble? a blue marble? a yellow marble?

Page 14: Basic probability Concepts and its application By Khubaib Raza

ExampleChoose a number at random from 1 to 5. What is the probability of each outcome? What is the probability that the number chosen is even? What is the probability that the number chosen is odd?

SOLUTION:The possible outcomes of this experiment are 1, 2, 3, 4 and 5.

Here, P(1)=P(2)=P(3)=P(4)=P(5) = Probability for any Number/Total Numbers = 1/5

P(Even) = No. of Even Numbers/Total Numbers = 2/5

P(Odd) = No. of Odd Numbers/Total Numbers = 3/5

Hence, the outcomes 1, 2, 3, 4 and 5 are equally likely to occur as a result of this experiment. However, the events even and odd are not equally likely to occur, since there are 3 odd numbers and only 2 even numbers from 1 to 5

Page 15: Basic probability Concepts and its application By Khubaib Raza

Comparison Probabilty and Permutation Defination of Probability

Formula of probability

Example

A fair coin is tossed find probability of

(1) Head appears

(2) Tail appears

(3) Head or Tail appears

Order Here order does’nt matter.

Defination of permutation

Formula of Permutation P(n,r) = n(n-1)(n-2)….(n-(n-r))

ExampleHow many possible permutations can be made by

three letters .

A

B

C ? Here n=3

OrderHere strictly we can say that order matters alot

)()(

in outcomes totalofnumbr thein outcomes ofnumber the)(

SnEn

SEEP

Page 16: Basic probability Concepts and its application By Khubaib Raza

Comparison Probabilty and PermutationKeep in mind

Tree diagrams in probability

Answer judgmentThe answer of sum of probabilities of an event are

equal to 1.

Answer RangeHere the answer of probability lies between 0 and 1.

Tree Diagrams

Here we can’t easily explain our answer

with tree diagrams

Answer JudgmentHere we can’t judge the answer before solving

Answer RangeThe answer of permutation lies in between the set

of Natural numbers N

Page 17: Basic probability Concepts and its application By Khubaib Raza

Probability in Computer Science

• During the past two decades probability theory has come to play an increasingly important role

in many areas of Computer Field.

• Machine Learning(Data mining )

• Information Retrieval (Web ..)

• Computer Vision

• Robotics

• Image Recovery

• Classification and clustering

Page 18: Basic probability Concepts and its application By Khubaib Raza

Probability in Computer Science

Examples:

Transfer data over the net

Page 19: Basic probability Concepts and its application By Khubaib Raza

Probability in Computer ScienceExamples:

Error Correction in Hard disks Google algorithms

Page 20: Basic probability Concepts and its application By Khubaib Raza

Thank YouWE ARE FIVE

K hubaibA liS ulemanA hteshamY aseen

[email protected] We are Five We are Five