Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 48

Orientation – Basic

Mathematics and
Statistics
DR. ROUDRA CHAKRABORTY
2
Pre-requisites for Probability
• Permutation and Combination
• Set Theory
• Mapping and Function
3
Permutations and Combinations
•  Number of ways n objects (n ≥ 0) can be arranged is or or factorial(n).
• n! = n(n – 1)(n – 2)…3.2.1 (example : 4! = 4 x 3 x 2 x 1 = 24)
• 0! = 1
• Number of ways r objects that can be arranged out of n objects = =
• Number of ways r objects that can be selected out of n objects = =
4
Permutations and Combinations
• Number
  of ways 2 letters can be arranged out of 5 letters A, B, C, D, E is
= = = 20
and they are
AB, AC, AD, AE, BA, BC, BD, BE, CA, CB, CD, CE, DA, DB, DC, DE, EA, EB, EC, ED.
• Number of ways 2 letters can be selected out of 5 letters A, B, C, D, E is
= = = 10
and they are
AB, AC, AD, AE, BC, BD, BE, CD, CE, DE.
5
Set Theory
•• Collection
  of well defined objects
• Sets are expressed in capital English letters
• E.g. A = {2, 5, -1, 0.96, 0} = {0, -1, 0.96, -1, 2, 5}
• E.g. B = {x : } = {1, 2}
• E.g. C = {2, 5}
• 0.96 A
• C A
• Null Set or Empty Set = Ø = { }
• Universal Set = S or U
6
Set Operations
•  Union : = {-1, 0, 0.96, 1, 2, 5}
• Intersection : = {2}
• Difference :
• A – B = {-1, 0, 0.96, 5}
• B – A = {1}
• Compliment =
• Some standard sets : . (naturals, rationals, integers, reals)
7
Some Properties
•    

• S’ =
• ’=S
8
Mapping and Function
•  f is a rule of association from set A to set B

x y
A B

• Mapping f : A B is defined by y = f(x) where x A and y B


• A is domain of f and B is co-domain of f
• f(A) = {f(x) : where x A} is range of f
9
Types of Mappings
•  Sometimes f(A) B, sometimes f(A) = B.

x y
A B f(A)

• If f(A) B, f is an INTO mapping.


• If f(A) = B, f is an ONTO mapping or SURJECTIVE mapping.
10
Examples
• y
  = 2x, x, y . Here range is the set of all even numbers, which is a subset of , the
co-domain. So the mapping is an INTO mapping.
• y = 2x, x , y . Here range and co-domain are equal. So the mapping is an ONTO
mapping.
• EXERCISE : Are f(x) and g(x) same?
, and,
11
Types of Mapping
• One
  to one mapping or injective mapping – One element of domain gets mapped into
exactly one element of co-domain. E.g. y = 2x + 3, x, y .
• Many to one mapping – Many elements of domain gets mapped into one element of co-
domain. E.g. y = , x, y .
• One to many mapping – One element of domain gets mapped into many elements of co-
domain. E.g. = x, x, y .
• Many to many mapping – Many elements of domain gets mapped into many elements of
co-domain. E.g. , x, y .
• One to one and many to one mappings are called FUNCTIONs.
12
Coin and Die
• A coin is a circular metal strip having two sides – one having the value or a
number (we call it “tail”) and the other one having a symbol (we call it “head”)
• A die is a cube having six faces with 1, 2, 3, 4, 5 and 6 dots inscribed on the faces.
Total of opposite faces of a die is 7. So, 6 is on the opposite face of 1, 5 is on the
opposite face of 2 and 4 is on the opposite face of 3. Plural of a die is dice.
13
Probability
• Experiment
• Random Experiment – A die is thrown
• Sample Space – S = {1, 2, 3, 4, 5, 6}
• Event – A = {1, 3}, B = {4, 5}, C = {2, 4, 6}
• Sure and Impossible Events – S and {8}
• Mutually Exclusive Events – A and C
• Exhaustive Set of Events – A, B and C
• Equally Likely Outcomes
14
Probability
•  Classical Definition – P(an event A) = .
• Limitations :
• All outcomes are assumed to equally likely.
• Not valid, when S is an infinite set.

• Frequency Definition – P(an event A) = .


• Limitations :
• Interpretation and evaluation is difficult for finite cases.
15
Probability
• Axiomatic
  Definition – P : , where Ω is the set of all events of a random
experiment, is a function, which follows the following axioms :
• P(A) ≥ 0
• P(S) = 1
• For n mutually exclusive events , the following holds
16
Example
• A batch contains 20 articles, of which 7 are defective. If 5 articles are taken out
from the batch at random, what is the probability that
a) None of them is defective.
b) 2 of them are defective.
c) At least 2 of them are defective.
d) At most 2 of them are defective.
e) All of them are defective.
17
Example – contd.
•   number of ways of selecting 5 articles (without knowing number of
Total
defectives) out of 20 is = 15504 = size of sample space.
a) P(none is defective) =
= =.
18
Example – contd.
•b)  P(2 are defective) =
= =.
c) P(at least 2 are defective) = P(2 are defective) + P(3 are defective) + P(4 are
defective) + P(5 are defective)
= + + + = + + + =.
d) P(at most 2 are defective) = do it yourself.
e) P(all are defective) = = .
19
Some Properties
•• 0  ≤ P(A) ≤ 1
• P() = 1 – P(A)
• P(Ø) = 0
• If then
• P(AB) = P(A) + P(B) – P(AB)
• Conditional Probability :
• P(A / B) = P(event A given the fact that event B has already occurred) = .
• P(B / A) = P(event B given the fact that event A has already occurred) = .
• Independent events – A and B are independent if P(A / B) = P(A) and P(B / A) = P(B)
or, P(AB) = P(A)P(B)
20
Bayes’ Theorem on Conditional Probability
•   E be a random experiment and S be its sample space. Also, let are n mutually
Let
exclusive and exhaustive set of events of E and A is any other event of E
dependent on occurrence of -s. If all the P()-s and P(A / )-s are known then, P( / A)
of a specific event , when A is stated to be actually occurred, is given by
21
Example
In a bolt factory, the machines I, II and III manufacture respectively 25, 35 and 40
per cent of the total product. Of their output 5, 4 and 2 per cent respectively are
defective bolts. One bolt is drawn at random from the product and is found to be
defective. What is the probability that it was manufactured by machine II?
22
Example – contd.
•   the event A be that the selected bolt is defective. Let the events be that the
Let
selected bolt come from machines I, II, III respectively.
We have to find P( / A).
P() = 0.25, P() = 0.35, P() = 0.40.
P(A / ) = 0.05, P(A / ) = 0.04, P(A / ) = 0.02.
Using Bayes’ theorem,
= = 0.405797
23
Random Variable
•  A function X : S is called a random variable.
Example –
Random Experiment – “tossing two unbiased coins together”
Sample space – S = {HH, HT, TH, TT}
A random variable X = “number of heads”
X(HH) = 2, X(HT) = 1, X(TH) = 1, X(TT) = 0.
So, here, the values X can take are 0, 1 and 2.
24
Probability Distribution
• If
  we create a table with the values of X and probability of their occurrences, it
will be called probability distribution
• So, in the example, X=x 0 1 2 Total
P(X = x) 1/4 2/4 or 1/2 1/4 1

• Or, the distribution can be expressed in function form as well.


• f(x) =
• Since, here, the values of X are discrete, the distribution is called discrete
probability distribution and f(x) is called probability mass function (p.m.f.)
25
Expectation
•  Expectation or mean = E(X) =
• Variance = E = , where
• So, in the example,
E(X) = 0 x ¼ + 1 x ½ + 2 x ¼ = 1
= =.
Variance = = .
26
Exercise
• Four unbiased coins are tossed. If X and Y denote respectively the “number of
heads” and the “longest run of heads”, create the probability distributions, the
means and the variances of X and Y.
27
Exercise – contd.
Sample HHHH HHHT HHTH HHTT HTHH HTHT HTTH HTTT
Points
X=x 4 3 3 2 3 2 2 1
Y=y 4 3 2 2 2 1 1 1
Sample THHH THHT THTH THTT TTHH TTHT TTTH TTTT
Points
X=x 3 2 2 1 2 1 1 0
Y=y 3 2 1 1 2 1 1 0
28
Exercise – contd.
X=x 0 1 2 3 4 Total
P(X = x) 1/16 4/16 6/16 4/16 1/16 1
Y=y 0 1 2 3 4 Total
P(Y = y) 1/16 7/16 5/16 2/16 1/16 1

E(X) = 0 x 1/16 + 1 x 4/16 + 2 x 6/16 + 3 x 4/16 + 4 x 1/16 = 2


E(Y) = 0 x 1/16 + 1 x 7/16 + 2 x 5/16 + 3 x 2/16 + 4 x 1/16 = 27 / 16 = 1.6875
Var(X) = 0 x 1/16 + 1 x 4/16 + 4 x 6/16 + 9 x 4/16 + 16 x 1/16 – 4 = 1
Var(Y) = 0 x 1/16 + 1 x 7/16 + 4 x 5/16 + 9 x 2/16 + 16 x 1/16 – 729/256 = 247/256 = 0.96484375
29
Continuous Probability Distribution
• Pre-requisite –
• Integral Calculus
30
31
32
So, total shaded area under the
 

33 curve is =
34
How to evaluate integrals…
•  Use following formulae –  

=x+c

 • And the following –

If then
35
Let us integrate some functions…
•  
Example 1:

Solution:
=
=
36
Let us continue…
=•  
=
=
Now, can you show that, ?
37
Another example…
•  
Example 2:

Solution:
=
=
38
Let us continue…
=•  
=
=
=
Now, can you show that, ?
39
Continuous Probability Distribution
•  X is a continuous random variable, the number of possible values which it can
If
assume is uncountably infinite, and hence, probability distribution table can not be
created. In this case, we introduce a function f(x) such it satisfies
(i) f(x) ≥ 0 and (ii)
The probability that X lies between two specific values c and d, is defined as
P(c ≤ X ≤ d) = .
f(x) is called probability density function (p.d.f.)
40
Expectation
•  X is a continuous random variable with p.d.f. f(x), then
If

Variance(X) =
41
Example
•   the value of k, mean and variance from the following, if f(x) is a probability
Find
density function, given by
where 0 ≤ x ≤ 1.
Solution :
If f(x) is a p.d.f., then .
Let us find where , 0 ≤ x ≤ 1.
42
Example – contd.
•=  
= + +
=0+ +0
= –
=
43
Example – contd.
•   =
=
Now, gives = 1 and thus k = 12.
So, where 0 ≤ x ≤ 1.
Mean = E(X) =
= + +
44
Example – contd.
•   =0+ +0
= –
=
=
=. So Mean = E(X) = .
45
Example – contd.
•  =
E()
= + +
=0+ +0
= –
=
46
Example – contd.
•   =
=. So E() = .
Variance(X) = = = .
47
Sums
Finally let us solve the following two sums, each on discrete and continuous
probability distribution.
 X is a discrete random variable having p.m.f.:
X=x 0 1 2 3 4 5 6 7
P(X = x) 0 k 2k 2k 3k

(i) Determine k. (ii) Find mean and standard deviation.


(iii) Find P(X > 4). (iv) P(|2X – 7| ≤ 3).
Answers : k = 1/10. Mean = 3.66. Standard Deviation = 1.8451. P(X > 4) = 0.2. P(|2X – 7| ≤ 3) = 0.71.
48
Sums
• A continuous random variable X has the p.d.f.

Find mean, variance and P(0.5 < X < 2.1).


Answer : Mean = 3/2, Variance = 5/12, P(0.5 < X < 2.1) = 0.735.

You might also like