Sei sulla pagina 1di 55

Centre for Computer Technology

ICT114 Mathematics for Computing


Week3

Probability

Objectives
Review of Week2 Experiments Multiplication Rule Permutations Combinations Probability Conditional Probability

March 20, 2012

Measures of Central Tendency


x1+x2+x3+.....+xn Mean, = -----------------------n Median is the middlemost number Mode of a data set is the value that occurs most often
March 20, 2012

Measures of Dispersion
Variance, (x1- )2 + (x2- )2 + .....+ (xn- )2 2 = ------------------------------------------n Standard Deviation = (positive square root)

March 20, 2012

Weighted Mean
For a given set of data, X = { x1, x2, ..., xn} and corresponding non-negative weights, W = { w1, w2, ..., wn} the weighted mean/average, is given by w1x1+w2x2+w3x3+.....+wnxn X = --------------------------------------w1+w2+w3++wn
March 20, 2012

Mean and Variance from Frequency Table


Interval a0- a1 mid point (x) x1 frequency (f) f1 f.X f1.x1 f.X2 f1.x1.x1

a1- a2
an-1 an All

x2
xn

f2
fn Total f

f2.x2
fn.xn Total f.x

f2.x2.x2
fn.xn.xn Total f.x.x

Mean = total (f.x) / total f Variance = total (f.x.x)/total f (mean)2

March 20, 2012

Centre for Computer Technology

Probability

Experiments
Experiment is a term used to describe any process that generates a data set. Experiments when performed under very nearly identical conditions, give results that are identical. In other words, the variables that affect the outcome of the result are controlled.

March 20, 2012

Random Experiments
In some experiments we cannot control certain variables that affect the outcome, even though most of the conditions are the same. Such experiments are called random experiments. In most cases the outcome is affected by chance.

March 20, 2012

Random Experiments

In a random experiment, we obtain an entire set of possible outcomes. Example: Tossing a die. The result of the experiment is that it will come up with one of the numbers that belongs to the set {1, 2, 3, 4, 5, 6}

March 20, 2012

Sample Space
The set of all possible outcomes of a statistical experiment is called Sample Space. It is generally denoted by the symbol, S, which corresponds to the universal set. Each element in a sample space is called an element or a member or a sample point.

March 20, 2012

Sample Space
Frequently there are more than one sample space possible. Generally, there is one set that provides the most information. Example: Tossing a die Possible outcomes are {1, 2, 3, 4, 5, 6} {even, odd}

March 20, 2012

Sample Space

If the sample space has a finite number of elements, it is called a finite sample space or a discrete sample space.

If the sample space has a non countable number of elements, it is called an infinite sample space or a nondiscrete sample space.

March 20, 2012

Sample Space
Example: Sample space resulting from the tossing of a coin, yields a discrete sample space. Picking any number, not just integers, from 1 to 10 yields a nondiscrete sample space.
March 20, 2012

Sample Space
One form to represent a sample space is by the use of a tree diagram. Example:Consider the selection of two items at random from a production line. Each item is classified defective (D) or non defective (N).
March 20, 2012

Event
An

event is a subset of the sample space S, generally denoted by A. In other words it is a set of possible outcomes for the experiment. If the outcome is an element of A, then the event A has occurred.
March 20, 2012

Event
An event which consists of a single point of S is called a simple or elementary event. S itself is called the sure or certain event, since an element of S must occur. The empty set (null) is called the impossible element because an element of cannot occur.

March 20, 2012

Event
Let A and B represent two events in S. 1. A U B is the event either A or B or both. 2. A B is the event both A and B 3. A B is the event A but not B. 4. A/ is the event not A. 5. If A and B are disjoint, i.e., A B = , then the events are mutually exclusive
March 20, 2012

Counting Sample Points


In statistics, there is a need to evaluate the chance linked with the occurrence of certain elements during an experiment. Sometimes all the sample points are counted without actually listing them. The basic principle of counting is called the multiplication rule.

March 20, 2012

Multiplication Rule

If an operation can be performed in n1 ways, and if for each of these a second operation can be performed in n2 ways, then the two operations can be performed together in n1.n2 ways. Example: Number of sample points when a pair of dice is thrown is (6).(6) = 36 ways.

March 20, 2012

In the previous example,

The first dice can land in n1=6 ways The second dice can also land in n2=6 ways
Using the Multiplication rule, The pair of dice can land in n1.n2 = (6).(6) = 36 ways
March 20, 2012

Example: A developer of a new subdivision offers prospective home buyers a choice of Tudor, rustic, colonial, and traditional exterior styling in ranch, two-storey, and split-level floor plans. In how many different ways can a buyer order one of these homes? The buyer has to choose from n1=4 and n2=3 homes. n1n2=(4).(3)=12 possible homes
March 20, 2012

Generalized Multiplication Rule


If an operation can be performed in n1 ways, and if for each of these a second operation can be performed in n2 ways, and for each of the first two a third operation can be performed in n3 ways, and so forth, then the sequence of k operations can be performed in n1.n2.n3nk ways.
March 20, 2012

Permutations
When dealing with a group of objects, there are a number of possible arrangements. For example, a number of different arrangements possible when a group of six people are sitting around a table. A permutation is an arrangement of all or part of a set of objects.

March 20, 2012

Permutations
Example: What are the different arrangements possible with the alphabets a, b, c taking all of them at a time.

The possible permutations are abc, acb, bca, bac, cab, cba

March 20, 2012

There are n1=3 choices for the first position, n2=2 choices for the second position and n3=1 choice for the last position. The total permutations/arrangements are n1. n2. n3 = 3.2.1 = 6 n distinct objects can be arranged in n.(n-1).(n-2)1 ways
March 20, 2012

Permutations
n distinct objects can be arranged in n.(n-1).(n-2)1 ways (the number of permutations for n distinct objects) The product is represented by n!

read as n factorial.
By definition 0!
March 20, 2012

= 1! = 1

Permutations
The number of permutations for n distinct objects taken r at a time n.(n-1).(n-2)(n-r+1)

The above product is represented by np = n! / (n-r)! r

March 20, 2012

Example: Three awards (research, teaching, service) will be given one year for a class of 25 graduate students in a statistics department. If each student can receive at most one award, how many possible selections are there? Since the awards are distinguishable, the total possible selections are 25p = 25! / (25-3)! = 25!/22! = 25.24.23 3 = 13800
March 20, 2012

Lets do this together


A president and a treasurer are to be chosen from a student club consisting of 50 people. How many different choices of officers are possible if a. there are no restrictions b. A will serve only if he is president c. B and C will serve together or not at all d. D and E will not serve together
March 20, 2012

Some more concepts

The number of permutations of n distinct objects arranged in a circle is (n-1)! The number of distinct permutations of n things of which n1 are of one kind, n2 of a second kind,.nk of a kth kind is n! ------------------(n1!)(n2!)(nk!)

March 20, 2012

Some more concepts


The number of arrangements of a set of n objects into r cells with n1 elements in the first cell, n2 elements in the second, and so forth, is n! ----------------------(n1!)(n2!)..(nr!) n1+n2++nr = n
March 20, 2012

Combinations
A

combination is a way of selecting r objects from n without regard to order. It is a partition with two cells. One cell contains the r objects selected and the other cell containing the (n-r) objects that are left.
March 20, 2012

Combinations
The number of combinations of n distinct objects taken r at a time is n! nc = -------------r r! (n-r)!

March 20, 2012

Example
Example:
A young boy asks his mother to get five game-boy cartridges from his collection of 10 arcade and 5 sports games. How many ways are there that his mother will get 3 arcade and 2 sports games, respectively?

March 20, 2012

Example (contd)
The number of ways of selecting 3 cartridges from 10 is 10c3= 120. The number of ways of selecting 2 cartridges from 5 is 5c2 = 10 Using the multiplication rule with n1=120 and n2 = 10, there are (120).(10) = 1200 ways
March 20, 2012

Concept of Probability
In a random experiment, there is uncertainty if a particular event will or will not occur. As a measure of chance or probability, a value between 0 and 1 is assigned. If an event certainly occurs, the probability of the event happening is 100% or 1. Similarly for other degrees of uncertainty.

March 20, 2012

Two important procedures Classical Approach


If an event can occur in h different ways out of a total of n possible ways, all of which are equally likely, then the probability of that event occurring is h/n.

March 20, 2012

Two important procedures Frequency Approach


If after n repetitions of an experiment, where n is very large, an event is observed to occur in h of these, then the probability of the event is h/n. This is also called the empirical probability of the event.
March 20, 2012

Axiomatic approach
Let S be a sample space Let C be a class of events and A be one of them To each event A in C, a real number P(A) is associated. P is called the probability function and P(A) the probability of the element.

March 20, 2012

Axioms of Probability

Axiom1: For every event A in class C P(A) 0 Axiom2: For the sure or certain event S in the class C, P(S) = 1 Axiom3: For any number of mutually exclusive events A1,A2, in the class C P(A1UA2) = P(A1)+P(A2)+.

March 20, 2012

Some Important Theorems


If A1A2, then P(A1) P(A2) P(A2-A1)=P(A1)-P(A2) For every event A, 0 P(A) 1 For , the empty set, P() = 0

March 20, 2012

Some Important Theorems


If A is the complement of A, then P(A) = 1 P(A) If A = A1 U A2 UU An, where A1, A2,An are mutually exclusive events, then, P(A) = P(A1)+P(A2)++P(An) If A and A are complementary events, then, P(A)+P(A) = 1

March 20, 2012

Example: A coin is tossed twice. What is the probability that at least one head occurs? The sample space for this experiment is S = {HH, HT, TH, TT} The number of times atleast one head occurs is 3. Therefore the probability that atleast one head occurs is P(A) = .
March 20, 2012

Lets do this together


Draw one card from an ordinary deck of cards. a) What is the probability that it is the Queen of Hearts? b) What is the probability that it is either the King or the Queen of Hearts? c) What is the probability of getting both the King and Queen of Hearts?
March 20, 2012

Lets do this together


A die is loaded in such a way that an even number is twice as likely to occur as an odd number. If E is the event that a number less than 4 occurs on a single throw of the die, find P(E). Hint : P(S) = P(A1)+P(A2)+.+P(An) = 1
March 20, 2012

Addition Theorem of Probability


If A and B are any two events, then P(AUB)=P(A)+P(B)-P(A B)

March 20, 2012

Lets do this together


John is a graduate who has been interviewed by two companies A and B. He assesses that his probability of getting an offer from A is 0.8, probability of getting an offer from B is 0.6. He also believes that his chance of getting an offer from both A and B is 0.5. What is the probability of he getting an offer from atleast one of these companies?
March 20, 2012

Conditional Probability

The probability of an event B occurring, when an event A has already occurred is called conditional probability, represented by P(B/A). The conditional probability of B, given A, denoted by P(B/A), is defined by P(A B) P(B/A) = ---------------if P(A)>0 P(A)

March 20, 2012

Multiplication Theorem
If in an experiment the events A and B can both occur, then P(AB) = P(BA) = P(B/A).P(A) = P(A/B).P(B)

March 20, 2012

Example: The probability that a regularly scheduled flight departs on time is P(D)=0.83, the probability that that it arrives on time is P(A)=0.82, and the probability that it departs and arrives on time is P(DA)=0.78. Find the probability that a plane (a) arrives on time given that it departed on time, and (b) departed on time given that it has arrived on time.
March 20, 2012

(a) The probability that a plane arrives on time given that it departed on time is P(A/D) = P(DA)/P(D) = 0.94 (b) The probability that a plane departed on time given that it has arrived on time is P(D/A) = P(DA)/P(A) = 0.95

March 20, 2012

Lets do this together


Suppose we have a fuse box containing 20 fuses, of which 5 are defective. If two fuses are selected at random and removed from the box in succession without replacing the first, what is the probability that both fuses are defective?

March 20, 2012

Summary

Permutations, npr =n! / { (n-r)! } Combinations, ncr = n! / { r! (n-r)! } If an event occurs in h different ways out of a total of n possible ways, then the probability is h/n. Addition Theorem, P(AUB) = P(A) + P(B) - P(A B) Conditional Probability, P(B/A) = P(A B) / P(A)

March 20, 2012

References

Spiegel, Schiller, Srinivasan : Probability and Statistics M R Spiegel : Theory and Problems of Statistics, Schaum's Outline Series, McGraw Hill http://mathworld.wolfram.com

March 20, 2012

Potrebbero piacerti anche