Tossing a coin 3 times & noting the sequence of outcomes.
TTT, TTH, THT, HTT, HHT, HTH, THA, HHH
Consider 100 tosses: therefore 2100 many sequence.
A random variable is a maping for Ω→R.
Consider X to be a random variable such that
X(ω)= Number of H's in the sequence.
TTT →0
TTH THT HTT →1
HTH HHT THH →2
HHH →3
Notice that x takes values {0,1,2,3} when no. of tosses =3
∴ If numbers of tosses is n then corresponding r.v. X will take values: {0,1,⋯n}
Note that: The probability of i,i∈{0,1,…n} is not same ∀i .
x: 0123
1331
Suppose p is the probability that the coin gives a H in one toss.
P(TTT)=(1−p)(1−p)(1−p)=(1−p)3=q3
P(1H)=P(TTH)+P(THT)+P(HTT)
=qqp+qpq+pqq=3pq2
Similarly, P(2H)=3p2q
And, P(3H)=p3
We can see that the probabilities can be obtained by
(q+p)3&
P(X=i)=3Cipi(1−p)3−i
In general if a coin has probability 'p' for H then the r.v X :
giving the can not of H in n tosses can be obtained from (q+p)n and,
P(x=i)=nCipiqn−i
Probability mass function for Binomial distribution with parameter n & p Bin (n, p)
Suppose we have X following Bin(6,p)
It is given that 9 P(4) = P(2)
what in the value of 'p'?
Solution:
P(4)=6C4p4q2P(2)=6C2p2q4
∴P(4)P(2)=9
i.e 6C4p4q26C2p2q4=9
i.e p2q2=9
i.e pq=3∴q=3p
Suppose X follows Bin(n, p) when n = 8.
P(1)=0.2048
P(2)=0.1024
Find the value of p.
Solution:
8C1p1q7=0.2048
8C2p2q6=0.1024
On dividing,
2!6!8!p2q68pq7=0.10240.2048 or 28p2q68pq7=2
or = 7p2q=2⇒q=7p
∴ value of p=81.
An important concept of a r.v is its mean or expectation.
The mean of a Bin(n, p) r.v =n p, and its variance is npq
If the mean of a Bin(n, p) r.v is 4 and its variance in half of its mean. Then compute the probability that the r.v. takes value ≥2.
Solution:
Mean =n p and variance = n p r & given that
n p q= 21np⇒q=21
∴p=21
Mean = 4 ⇒n⋅21=4 ⇒n=8.
∴Bin(8,21)
We need to compute P(Bin(8,21))≥2
ie 1−P(0)−P(1)
=1−8C0(21)0(21)8−8C1(21)1(21)7
= 1−(21)8−8⋅(21)8
= 1−9⋅(21)8
= 1−9⋅2561=256256−9
= 256247
Use of Binomial theorem in counting the number of certain events.
For illustration. Consider the problem that in how many ways you can have 5 different positive integers
0<n1<n2<n3<n4<n5
such that∑i=15xi=20
The number of solution in 7 .
But we have done it in a mechanical way:
such a solution is not guaranteed to give all possible combination
1 | 2 | 3 | 4 | 10 |
---|---|---|---|---|
1 | 2 | 3 | 5 | 9 |
1 | 2 | 3 | 6 | 8 |
1 | 2 | 4 | 5 | 8 |
1 | 2 | 4 | 6 | 7 |
1 | 3 | 4 | 5 | 7 |
2 | 3 | 4 | 5 | 6 |
In how many ways we can have two variables
x & y ⇒ 0≤x≤2 & 1≤y≤2
& x+y=3 here X and Y are integer variables
x | y | sum |
---|---|---|
0 | 1 | 1 |
0 | 2 | 2 |
1 | 1 | 2 |
1 | 2 | 3 |
2 | 1 | 3 |
2 | 2 | 4 |
Consider the following two polynomials & compute their product.
(z0+z1+z2)(z1+z2)
=(1+z+z2)(z+z2)
=z+z2+z3+z2+z3+z4
=z+2z2+2z3+z4.
Suppose we want to find out x+y+z=10
when, 0≤X≤4, Y>0
Z≥0 here X,Y,Z are integer variables.
Consider, (x0+x1+x2+x3+x4)
⋅(x+x2+⋯)(1+x+x2+⋯)
Obtain the coefficient of x0 that will give the number of possible solution to the problem.
(1+x+x2+x3+x4)x
⋅(1+x+x2+⋯)2
(x+x2+x3+x4+x5)(1+x+x2⋯)2
Now we know that,
(1+x+x2+⋯)n=(1−x)n1=(1−x)−n
=1+∑r=1∞n−1+rCrxr
we need to find out coefficient of x9,x8,x7...x5
Let us consider x5
Here n=2, r=5
∴ coefficient of x5=2+5−1C5
r=5=6C5=6
Let us compute for x9.
Here, r=9∴ coeff x9=9+2−1C5
10C9=10
You understand that the total no. of
possible solution = 10+9+8+7+6 = 40
∴ The number of possible solution is 40 .
Note that we are forming the power series corresponding to each variable by considering the values that it may take.
For example: In how many ways we can get x+y+z=50
→x in a multiple of 2
y is a multiple of 3
z is positive & multiple of 5
∴ The no. of solution for x + y + z = 50 with the above restiction will be given by coeff. of x50 in:
(1+x2+x4+⋯)×(1+x3+x6+x9+⋯)
×(x5+x10+x15+⋯)
0<n1<n2<n3<n4<n5∑i=15ni=20
Note that all the 5 variables are integers.
Solution:
let : m2=n2−n1
m3=n3−n2
m4=n4−n3
m5=n5−n4
∴n1& m2m3mnm5 are all >0
More over
n1+n2+n3+n4+n5=20
5 n1+4(n2−n1)+3(n3−n2)+2(n4−n3)+(n5−n4)=20
or 5n1+4m2+3m3+2m4+m5=20 when n12 & all mi>0
Let us now make the following subsitution.
x1=m1−1
x2=m2−1
x3=m3−1
x4=m4−1
x5=m5−1
∴ Each xi≥0
∴5x1+4x2+3x3+2x4+x5=5(x1−1)+4(x2−1)
+3(m3−1) +2(mn−1) and (m5−1)
=20−(1+2+3+4+5) =20−15=5 when xi≥0
Now 5x1, take values {0, 5 , 10.........}
4x2 take value{0,4,8,12........... }
3x3 take value{0,3,6,........... }
2x4 take value{0,2,4,6........... }
x5 take value{0,1,2,3........... }
∴ The power series for us is
(1+x5+x10⋯)(1+x4+x8+⋯)(1+x3+x6+⋯)
(1+x2+x4+⋯)(1+x+x2+x3−⋯)
We need to compute the coeff. of x5.
∴ The problem in to compute coeff of x5 in.
(1+x5)(1+x4)(1+x3)(1+x2+x4)(1+x+x2+x3+x4+x5)
(1+x4+x5)(1+x2+x4+x3+x5+x7)(1+x+x2+x3+x4+x5)
(1+x4+x5)(1+x2+x3+x4+x5)(1+x+x2+x3+x4+x5)
(1+x2+x3+x4+x5+x4+x5)(1+x+⋯+x5)
=(1+x2+x3+2x4+2x5)(1+x+⋯+x5)
∴ coeff. x5=7
No of possible solution =7
0<n1<n2<n3<n4
→∑i=1nni=16 Note that all the 4 variables are integers.
The no. of solution = 9