-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path05-probability-distribution.Rmd
4615 lines (3345 loc) · 132 KB
/
05-probability-distribution.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Probability Distribution
[book](pdf/book05.pdf){target="_blank"}
[eStat YouTube Channel](https://www.youtube.com/channel/UCw2Rzl9A4rXMcT8ue8GH3IA){target="_blank"}
**CHAPTER OBJECTIVES**
Similar events occur repeatedly in our everyday life. We describe a
chance of the event using a concept of the probability.
In this chapter, we describe a definition of the probability in Section
5.1. Several rules of calculating the probability is described in
Section 5.2.
There are many possible events in our everyday life which we can
calculate the probability of the event. We focus on events which occur
frequently and can be modeled as a random variable. Probability of all
possible events of the random variable is called a probability
distribution function.
In section 5.3, probability distributions of the discrete random
variable such as Binomial Distribution, Poisson distribution, Geometric
Distribution, Hypergeometric Distribution are described.
In section 5.4, probability distributions of continuous random variables
such as Normal Distribution, and Exponential Distribution are described.
:::
:::
## Definition of Probability
::: presentation-video-link
[presentation](pdf/0501.pdf){.presentation-link target="_blank"}
[video](https://youtu.be/F-pJi4L3fMw){.video-link target="_blank"}
:::
Similar events occur repeatedly or are carried out in our everyday life.
Let us consider following examples.
::: textL30M10
- A machine produces products repeatedly at a production plant. The
product can be either a normal product or a defective product, but it is
not known in advance.
- I have ordered pizza at home every Sunday. It usually takes about 30
minutes for a pizza to be delivered to the house, but the exact time is
not known.
:::
These examples have common characteristics as follows.
::: textL30M10
- There is repetition of similar events, such as the production of
products or pizza deliveries.
- We know all possibile outcomes of events that the product will be
defective or normal, and the pizza delivery time will be 10 minute, 20
minutes, 30 minutes and so on.
- But we do not know which outcome exactly will happen.
:::
Events with these three characteristics are subject to study and to
apply statistics.
An experiment in which a particular outcome occurs among known possible
outcomes is called a **statistical experiment**. In a statistical
experiment, the resulting outcome is uncertain and is determined by
chance. For example, if you throw a coin, possible outcomes are either
the head or tail, but the resulting outcome will come out by chance, so
the experiment of tossing a coin is a statistical experiment. If a
production plant produces products at one machine and their possible
outcomes are either defective or normal, then the experiment of
producing a product is a statistical experiment. Also, a pizza delivery
time to your home which takes between 20 and 60 minutes is a statistical
experiment.
::: mainTableYellow
**Statistical experiment**
An experiment in which a particular outcome occurs among known possible
outcomes. The outcome is uncertain and is determined by chance.
:::
In a statistical experiment, the set of all possible outcomes is
referred to as a **sample space**, and a subset of this sample space is
referred to as an **event**. The sample space is usually denoted by S,
and events of the sample space are denoted by English capital letters as
A, B, and C \... In the example above that a machine produces a product,
the sample space is S = {normal, defective} and a subset of the sample
space such as A = {defective} is an event. As such, when the number of
elements in a sample space is either finite or countably infinite, it is
called a **discrete sample space**. In a statistical experiment of the
pizza delivery time to home, the sample space is all possible time
between 20 minutes and 60 minutes, i.e. S = { (20,60) }. Delivery time
between 20 minutes and 30 minutes ({20,30}) is called an event. As such,
when the number of elements in a sample space is uncountably infinite,
it is called a **continuous sample space**.
::: mainTableYellow
**Sample space and event**
A set of all possible outcomes in a statistical experiment is referred
to as a **sample space**. If the number of elements in a sample space is
finite or countably infinite, it is called a **discrete sample space**.
If the number of elements in a sample space is uncountably infinite, it
is called a **continuous sample space**.
A subset of the sample space is referred to as an **event**.
A concept of probability is used to indicate the possibility of an event
occurring in a statistical experiment. The **probability** is a
representation of the likelihood of an event occurring using a number
between 0 and 1. If an event is likely to occur, the probability is
expressed as a number close to 1. If it is unlikely to occur, the
probability is expressed as a number close to zero. Specifically, there
are several ways to define the probability of an event using a number
between zero and one. We introduce two definitions of the probability,
one is a classical definition and the other is a relative definition of
the probability.
:::
::: mainTableYellow
**Classical definition of probability**
Assume that all elements in sample space are likely to occur equally.
The probability of an event A will occur, denoted as P(A), in case of
the discrete sample space is defined as follows: $$ \small
P(A) = \frac {\text {Number of elements belonging to an event A}} {\text {Total number of elements in sample space}}
$$
The probability of an event A will occur in case of the continuous
sample space is defined as follows. $$ \small
P(A) = \frac {\text {Measurement of elements belonging to an event A}} {\text {Measurement of the total elements of a sample space} }
$$ where measurement here can be the length, area and volume etc.
:::
::: mainTableGrey
**Example 5.1.1** An office worker went on a business trip to a city and
there are two restaurants (Restaurant A and B) near his lodging. He was
hesitating about which restaurant to go, and threw a dice to count the
number of points that appear on the top. If he had odd numbers, he would
go to the Restaurant A, and if he had even numbers, he would go to the
Restaurant B. What is the probability that the Restaurant A would be
picked?
**Answer**
The sample space in this statistical experiment, which counts the number
of points on the top by throwing a dice, is {1, 2, 3, 4, 5, 6}, and the
number of odd events is {1, 3, 5}, so there are three elements.
Therefore, the probability that restaurant A will be selected is 3/6 =
1/2.
:::
::: mainTableGrey
**Example 5.1.2** I ordered a pizza from home every Sunday. The time it
takes for a pizza to be delivered my home has the same possibility for
any time from 10 to 30 minutes (you may have a decimal number). What is
the probability that a pizza will be delivered between 20 and 25
minutes?
**Answer**
The sample space in this example is all values from 10 to 30 minutes
collectively { (10,30) }, and where a pizza is delivered between 20 and
25 minutes is the event { (20,25) }. Therefore, the probability of this
event is $\small \frac {(25-20)} { (30-10)} = 0.25$ by measuring the
distance of the interval.
:::
<div>
The classical definition of the probability does not usually have a
major problem in calculating the probability of a real problem. However,
in the classical definition of the probability, it may not be possible
to assume that all elements of the sample space are likely to occur. For
example, tossing a coin usually results in 'Head' and 'Tail' but can
be very rarely 'Edge'. Considering this, the assumption that the sample
space {'Head', 'Tail' and 'Edge'} does not make sense that at this
time each element of the sample space is likely to occur equally. The
relative frequency definition of the probability is to solve these
problems.
</div>
::: mainTableYellow
**Relative frequency definition of probability**
The probability that an event A will occur, denoted by P(A), is the rate
at which the event A occurs when many statistical experiments are
conducted under the same condition repeatedly.
:::
::: mainTable
If this definition is used, it can be explained that the coin tossing
stands as an 'Edge.' If a coin has been thrown 10,000 times and
'Head' is appeared 4980 times, 'Tail' 5018 times, 'Edge' twice,
then P({Head}) = 4980/10000, P({Tail}) = 5018/10000, P({Edge}) =
2/10000. More iterative runs make the definition of the probability
using the relative frequency almost approximates to the probability
values by the classical definition.
[Figure 5.1.1]{.figure-ref} shows a simulation of a coin toss experiment using
『eStatU』 which shows the probability of 'Head' occurrence converges to
one-half. This convergence of the probability is called the **law of
large numbers**.
:::
<div>
<div>
<input class="qrBtn" onclick="window.open(addrStr[94])" src="QR/eStatU630_LawOfLarge.svg" type="image"/>
</div>
<div>
![](Figure/Fig050101.png){.imgFig500500}
::: figText
[Figure 5.1.1]{.figure-ref} Law of large number simulation
:::
</div>
</div>
:::
:::
## Calculation of Probability
::: presentation-video-link
[presentation](pdf/0502.pdf){.presentation-link target="_blank"}
[video](https://youtu.be/CNga9xRKVwg){.video-link target="_blank"}
:::
::: mainTable
In order to calculate the probability of an event in a discrete sample
space, the number of elements in the sample space and the number of
elements included in the event should be counted. If all possible
outcomes of the sample space is not large, the probability can be simply
calculated, but it is generally not easy to count the number of possible
outcomes. Effective methods for counting the number of complex cases
include the permutation and combination.
:::
::: mainTableYellow
**Permutation**
The number of cases to select r objects out of n objects considering the
order is called the **permutation** and is calculated as follows: $$
_{n} P_{r} = n (n-1) (n-2) \cdots (n-r+1) = \frac {n!} {(n-r)!}
$$ Therefore, the number of cases to list all n objects is as
follows: $$
_{n} P_{n} = n(n-1)(n-2) \cdots 2 \cdot 1 = n!
$$ Note: 0! = 1
:::
::: mainTableYellow
**Combination**
The number of cases to select r objects out of n objects without
considering the order is called the **combination** and is calculated as
follows. $$
_{n} C_{r} = \frac { _{n} P_{r} } {r!} = \frac {n!} {r!(n-r)!}
$$
:::
::: mainTableGrey
**Example 5.2.1** Four people A, B, C and D are intended to be placed on
four side-by-side chairs. Calculate the total number of cases in which
four people are placed, and the number of cases in which A is placed on
the leftmost. What is the probability that A is placed on the leftmost
side?
**Answer**
The number of elements in the sample space in this example is as
follows. $$ \small
\begin{multline}
\shoveleft\text { (number of people that can be placed on the leftmost) } × \\
\shoveleft\text { (number of people except left who can be placed in the second position) } × \\
\shoveleft\text { (number of people who can be placed in the third place except for two left people) } × \\
\shoveleft\text { (number of people, excluding the three on the left, who can be positioned to the right) } \\
\shoveleft = 4 × 3 × 2 × 1 = 4! = 24
\end{multline}
$$ The event in which A is placed on the left is the number of
people placed in the second, third, and right positions except A, so
3×2×1 = 3!. Therefore, the probability that A will be placed to the left
is as follows.
$\qquad \small \frac {3!} {4!} = \frac {6} {24} = 0.25$
:::
::: mainTableGrey
**Example 5.2.2** A company has four security guards (A, B, C, D). Each
morning, two of these guards are randomly selected, one at the front
gate and the other at the rear guard. Obtain the total number of cases
in which four people are placed at the front and rear gates and the
number of cases in which A is placed at the front gate. What is the
probability that A will be placed at the front gate?
**Answer**
The number of elements in the sample space in this problem is as
follows.
$\qquad \small \text { (number of people who can be placed at the front gate) } ×$\
$\qquad \small \text { (number of people who can be placed in the rear except those placed in the front) }$\
$\qquad \small = 4 × 3 = {}_{4}P_{2} = 12$
The number of elements in the event where A will be placed at the front
gate is $_{3} P_{1} = 3$, since A can be placed at the front gate and
one of the other three can be placed at the rear gate. That is, the
probability that A will be placed at the front gate one day is as
follows.
$\qquad \small \frac { {}_{3}P_{1}} { {}_{4}P_{2}} = \frac {3 \times 1} {4 \times 3} = \frac {1} {4}$
:::
::: mainTable
There are several calculation rules for calculating complex
probabilities other than the permutation and the combination. Let us
consider the examples below to explain the rules.
:::
::: mainTableGrey
**Example 5.2.3** Out of 40 sophomores in a Statistics Department this
semester, 25 students are taking Economics, 30 students are taking
Political Science and 20 students are taking both courses. When I meet
one of the sophomores, what is the probability of this student taking
either Economics or Political Science (that is one or both)?
**Answer**
<div>
<div>
<input class="qrBtn" onclick="window.open(addrStr[126])" src="QR/eStatU_40AdditionRule.svg" type="image"/>
</div>
<div>
Since there are 25 students who take Economics and 20 students taking
both courses, 25 - 20 = 5 students take only Economics. Also, since
there are 30 students who take Political Science, 30 - 20 = 10 students
take only Political Science. Thus, as shown in [Figure 5.2.1]{.figure-ref}, the
number of students taking either Economics or Political Science is 5 +
10 + 20 = 35. Therefore, the probability of students taking either
Economics or Political Science is 35 / 40.
</div>
</div>
![](Figure/Fig050201.png){.imgFig400300}
::: figText
[Figure 5.2.1]{.figure-ref} Students who take either economics or political science
:::
Consider the case of students taking both Economics (A) and Political
Science (B). The event that a student takes both courses are denoted as
A ∩ B and is called an intersection event of A and B ([Figure 5.2.2]{.figure-ref}).
![](Figure/Fig050202.gif){.imgFig400300}
::: figText
[Figure 5.2.2]{.figure-ref} Intersection events A ∩ B
:::
The event that a student takes either Economics or Political Science
(one or both) is denoted as A ∪ B and is called an union event of A and
B ([Figure 5.2.3]{.figure-ref}).
![](Figure/Fig050203.gif){.imgFig400300}
::: figText
[Figure 5.2.3]{.figure-ref} Union Event A ∪ B
:::
Probabilities of these events on this example are as follows:
::: textL40
P(A) = 25 / 40\
P(B) = 30 / 40\
P(A ∩ B) = 20 / 40\
P(A ∪ B) = 35 / 40\
:::
The probability of P(A ∪ B) can also be calculated as follows if you
look at the [Figure 5.2.1]{.figure-ref}.
::: textL40
P(A ∪ B) = P(A) + P(B) - P(A ∪ B) = 25/40 + 30/40 - 20/40 = 35/40
:::
That is, the probability of taking either Economics or Political
Science, P(A ∪ B), can be calculated by adding the probability of taking
each course and then by subtracting the probability of taking both
courses.
:::
::: mainTable
The rule discussed on [Example 5.2.3]{.example-ref} is called the addition rule of
probability.
:::
::: mainTableYellow
**Addition Rule of Probability**
$$\ P(A ∪ B) = P(A) + P(B) - P(A ∩ B) $$
If A ∩ B = ∅, then the rule becomes as follows:
$$ P(A ∪ B) = P(A) + P(B)$$
In this case, the events A and B are called **mutually exclusive
events**.
:::
::: mainTableGrey
**Example 5.2.4** In [Example 5.2.3]{.example-ref}, if there are 10 students taking
Economics, 20 students taking Political Science, and if there are no
students taking both courses, what is the probability of a student is
taking either Economics or Political Science?
**Answer**
In this case, because there are no students taking both courses, the
events in which they take Economics (A) and Political Science (B) are
mutually exclusive. Thus, the probability to take either Economics or
Political Science, P(A U B), is as follows:
::: textL40
P(A U B) = P(A) + P(B) = 10/40 + 20/40 = 0.75
:::
:::
<div>
Let us consider the example below to find out the multiplication rule of
probability.
</div>
::: mainTableGrey
**Example 5.2.5** Students of ADA University come from either Baku or a
province. Among the 30 sophomores in the Department of Economics, there
are 10 males and 20 females, one of males and five of females are from
the province.
::: textL20M20
1\) When selecting a student, what is the probability that he is from
the province?
:::
::: textL20M20
2\) When I selected a student, she was a female. What is the probability
that this student is from the province?
:::
::: textL20M20
3\) When I selected a student, he was from the province. What is the
probability of this student being a male?
:::
::: textL20M20
4\) When selecting a student, what is the probability that he is a male
and from Baku?
:::
**Answer**
To solve this problem, it is convenient to organize the information
given into a cross table as shown below.
Baku
Province
Total
:::
:::
Male
1
10
Female
5
20
Total
10
20
30
If we calculate and insert the blanks on the above table, it is as
follows. Let us call the event of male as M, the female as F, from Baku
as B, from the province as C.
Baku(B)
Province(C)
Total
Male(M)
9
1
10
Female)F
15
5
20
Total
10
20
30
1\) $\small P(C) =$ 6/30.
2\) The probability that this student is from the province among females
is 5/20. This probability is denoted as $\small P(C∣F)$ and is called a
conditional probability.
3\) The probability of a male from the province is $\small P(M∣C) =$
1/6.
4\) The probability is $\small P(M ∩ B)$ and the cross table shows that
the answer is 9/30. Alternatively, the probability of being a male among
all students can be first obtained as $\small P(M) =$ (10/30) and then
multiplied by the conditional probability of being from Baku among
males, $\small P(B∣M)$ = 9/10. Namely
$\qquad \small P(M ∩ B) = P(M) P(B∣M) = (10/30) \times (9/10) = 9/30$
This expression shows that the conditional probability $\small P(B∣M)$
can be calculated by dividing $\small P(M ∩ B)$ by $\small P(M)$.
$\qquad \small P(B ∣ M) = \frac {P(M ∩ B)} {P(M)} = \frac { 9/30} {10/30} = \frac {9} {10}$
In addition, the probability $\small P(M ∩ B)$ can be obtained first by
the probability of being a student from Baku, $\small P(B) =$ 24/30, and
then multiplied by the probability of being a male from Baku
($\small P(M∣B) =$ 9/24).
$\qquad \small P(M ∩ B) = P(B) P(M∣B) = (24/30) × (9/24)$
<div>
Conditional probability is generally defined as follows.
</div>
::: mainTableYellow
**Conditional Probability**
$$ \small
P(A ∣ B) = \frac {P(A ∩ B)} {P(B)} \qquad \qquad \textrm{if} \quad P(B) ≠ 0
$$
<input class="qrBtn" onclick="window.open(addrStr[130])" src="QR/eStatU_40MultiplicationRule.svg" type="image"/>
:::
<div>
In the above example, the probability of an intersection event is
expressed by multiplying the probabilities of other events and it is
called the **multiplication rule of probability**.
::: mainTableYellow
**Multiplication Rule of Probability**
$$ \small
P(A ∩ B) = P(A) P(B∣A)
$$ If $\small P(B∣A) = P(B)$, then the rule becomes as follows:
$$ \small
P(A ∩ B) = P(A) P(B)
$$ In this case, the events $\small A$ and $\small B$ are called
**independent events**.
:::
::: mainTableGrey
**Example 5.2.6** Tiger team of professional baseball has the
probability of 0.7 to beat Lion team recently. What is the probability
that Tiger is winning both games in this evening's double match? Assume
that winning one game does not affect winning the next.
**Answer**
Let us call the event that the Tiger wins the first game is $\small A$
and the event that the Tiger wins the second game is $\small B$. Since A
and B are independent of each other, the probability that the Tiger is
winning both games is as follows.
$\qquad \small P(A ∩ B) = P(A) P(B) = 0.7 × 0.7 = 0.49$
:::
::: mainTableGrey
**Example 5.2.7** The following is a table of 30 second-year students by
gender and region of origin. Are the events of male and Baku origin
independent of each other?
Baku(B)
Province(C)
Total
:::
</div>
Male(M)
5
5
10
Female)F
10
10
20
Total
15
15
30
**Answer**
Let us call the event of male as $\small M$, female as $\small F$, from
Baku as $\small B$, and from province as $\small C$. From the table,
probabilities of $\small P(M ∩ B)$, $\small P(M)$ and $\small P(B)$ are
as follows:
$\qquad \small P(M ∩ B) = 5/30 \\ P(M) = 10/30 \\ P(B) = 15/30$
Therefore, the following relationship is satisfied:
$\qquad \small P(M ∩ B) = P(M) P(B)$
The events of male and Baku origin are independent of each other. Note
that
$\qquad \small P(M∣B) = 5/15 = 1/3 \\ P(M)=10/30 \\ \text{so,} P(M∣B) = P(M).$
In this case, all events of both $\small M$ and $\small C$ , $\small F$
and $\small B$ , $\small F$ and $\small C$ are independent of each
other. We call the two attributes, gender and region are independent of
each other. In [Example 5.2.5]{.example-ref}, gender and region are not independent
of each other.
<div>
The following is an example of how to calculate the probability of a
complementary event.
</div>
::: mainTableGrey
**Example 5.2.8** There is a box of six products, two of which are
defective. What is the probability that at least one defective product
will be found when three have been extracted for product testing? Assume
that the product is extracted once for inspection without replacement.
**Answer**
The probability of finding one defective in the three product tests is
as follows.
$\qquad \small \frac { _4 C_2 \times _2 C_1 } {_6 C_3 } = \frac {3}{5}.$
The probability of finding two defective products is as follows.
$\qquad \small \frac { _4 C_1 \times _2 C_2 } {_6 C_3 } = \frac {1}{5}.$
Thus, the probability that at least one defect will be found is 3/5 +
1/5 = 4/5. Another way to calculate this probability is to obtain the
probability of an event in which there will be no defect (this is called
a complementary event) and then, subtract it from 1. In other words, the
probability that at least one defective product can be calculated as
follows.
$\qquad \small 1 - \frac { _4 C_3 } {_6 C_3 } = 1 - \frac {4}{20} = \frac {4}{5}.$
:::
::: mainTable
The method used in the above example is called a rule of probability
calculation using a complementary event, and is often used to obtain the
probability that the word 'at least' is contained. [Figure 5.2.4]{.figure-ref} is
a picture of an event.
![](Figure/Fig050204.gif){.imgFig400300}
::: figText
[Figure 5.2.4]{.figure-ref} Complementary event
:::
:::
::: mainTableYellow
**Probability of a complementary event**
if $\small A^C$ denotes a complementary event of the event $\small A$,
then $\small P(A^C )$ can be calculated as follows. $$ \small
P(A^C) = 1 - P(A)
$$
:::
::: mainTablePink
### Multiple Choice Exercise
Choose one answer and click Submit button
::: textL30M30
5.1 When two events A and B are mutually exclusive, what is the
probability of an event A∪B?
:::
<form name="Q1">
<label><input name="item" type="radio" value="1"/> P(A)-P(B)</label><br/>
<label><input name="item" type="radio" value="2"/> P(A)P(B)</label><br/>
<label><input name="item" type="radio" value="3"/> P(A)+P(B)</label><br/>
<label><input name="item" type="radio" value="4"/> P(A)/P(B)</label><br/>
<p>
<input onclick="radio(5,1,Q1)" type="button" value="Submit"/>
<input id="ansQ1" size="15" type="text"/>
</p></form>
::: textL30M30
5.2 Let the probability that event A will occur be P(A) and the
probability that event B will occur be P(B). Which of the following is
wrong?
:::
<form name="Q2">
<label><input name="item" type="radio" value="1"/> 0 ≤ P(A) ≤ 1</label><br/>
<label><input name="item" type="radio" value="2"/> -1 ≤ P(B) ≤ 0 </label><br/>
<label><input name="item" type="radio" value="3"/> P(A∪B)=P(A)+P(B)-P(A∩B)</label><br/>
<label><input name="item" type="radio" value="4"/> P(A∩B)=P(A)․P(B) </label><br/>
<p>
<input onclick="radio(5,2,Q2)" type="button" value="Submit"/>
<input id="ansQ2" size="15" type="text"/>
</p></form>
::: textL30M30
5.3 The value of P(A)=0.4, P(B)=0.2, P(A\|B)=0.6. What is the
probability of P(A∩B)?
:::
<form name="Q3">
<label><input name="item" type="radio" value="1"/> 0.08</label><br/>
<label><input name="item" type="radio" value="2"/> 0.12</label><br/>
<label><input name="item" type="radio" value="3"/> 0.24</label><br/>
<label><input name="item" type="radio" value="4"/> 0.48</label><br/>
<p>
<input onclick="radio(5,3,Q3)" type="button" value="Submit"/>
<input id="ansQ3" size="15" type="text"/>
</p></form>
::: textL30M30
5.4 If A ⊂ B, what is the comparison between the conditional probability
P(A\|B) and P(A)?
:::
<form name="Q4">
<label><input name="item" type="radio" value="1"/> equal or greater</label><br/>
<label><input name="item" type="radio" value="2"/> smaller</label><br/>
<label><input name="item" type="radio" value="3"/> equal or smaller</label><br/>
<label><input name="item" type="radio" value="4"/> There is no comparison</label><br/>
<p>
<input onclick="radio(5,4,Q4)" type="button" value="Submit"/>
<input id="ansQ4" size="15" type="text"/>
</p></form>
::: textL30M30
5.5 How likely are 2 and 5 to appear at the same time when throwing 2
dice?
:::
<form name="Q5">
<label><input name="item" type="radio" value="1"/> 1/3</label><br/>
<label><input name="item" type="radio" value="2"/> 1/6</label><br/>
<label><input name="item" type="radio" value="3"/> 1/12</label><br/>
<label><input name="item" type="radio" value="4"/> 1/18</label><br/>
<p>
<input onclick="radio(5,5,Q5)" type="button" value="Submit"/>
<input id="ansQ5" size="15" type="text"/>
</p></form>
::: textL30M30
5.6 When throwing a dice three times, what is the probability that the
number of eyes is 5 at the first throw, 3 at the second, and an even
number of eyes at the third?
:::
<form name="Q6">
<label><input name="item" type="radio" value="1"/> 1/30</label><br/>
<label><input name="item" type="radio" value="2"/> 1/72</label><br/>
<label><input name="item" type="radio" value="3"/> 1/108</label><br/>
<label><input name="item" type="radio" value="4"/> 1/276</label><br/>
<p>
<input onclick="radio(5,6,Q6)" type="button" value="Submit"/>
<input id="ansQ6" size="15" type="text"/>
</p></form>
::: textL30M30
5.7 When you extract three light bulbs randomly without replacement one
by one from a barrel containing five good bulbs and two defective bulbs,
what is the probability that one bulb is a defective item?
:::
<form name="Q7">
<label><input name="item" type="radio" value="1"/> 1/7</label><br/>
<label><input name="item" type="radio" value="2"/> 2/7</label><br/>
<label><input name="item" type="radio" value="3"/> 3/7.</label><br/>
<label><input name="item" type="radio" value="4"/> 4/7</label><br/>
<p>
<input onclick="radio(5,7,Q7)" type="button" value="Submit"/>
<input id="ansQ7" size="15" type="text"/>
</p></form>
::: textL30M30
5.8 When P(B)=0.2, P(A∩B)= 0.12, what is the value of P(A\|B)?
:::
<form name="Q8">
<label><input name="item" type="radio" value="1"/> 0.20</label><br/>
<label><input name="item" type="radio" value="2"/> 0.60</label><br/>
<label><input name="item" type="radio" value="3"/> 0.12</label><br/>
<label><input name="item" type="radio" value="4"/> 0.24</label><br/>
<p>
<input onclick="radio(5,8,Q8)" type="button" value="Submit"/>
<input id="ansQ8" size="15" type="text"/>
</p></form>
::: textL30M30
5.9 When P(A)=0.4, P(B)=0.2, P(A\|B)=0.6, what is the value of P(B\|A)?
:::
<form name="Q9">
<label><input name="item" type="radio" value="1"/> 0.08</label><br/>
<label><input name="item" type="radio" value="2"/> 0.24</label><br/>
<label><input name="item" type="radio" value="3"/> 0.30</label><br/>
<label><input name="item" type="radio" value="4"/> 0.40</label><br/>
<p>
<input onclick="radio(5,9,Q9)" type="button" value="Submit"/>
<input id="ansQ9" size="15" type="text"/>
</p></form>
::: textL30M30
5.10 Mark the result of throwing two dice as ( $x_1 , x_2$ ) and let
$B = \{ (x_{1} ,x_{2} ) | x_{1} > x_{2} \}$ . What is the value of P(B)?
:::
<form name="Q10">
<label><input name="item" type="radio" value="1"/> 1/3</label><br/>
<label><input name="item" type="radio" value="2"/> 1/12</label><br/>
<label><input name="item" type="radio" value="3"/> 5/12</label><br/>
<label><input name="item" type="radio" value="4"/> 1/36</label><br/>
<p>
<input onclick="radio(5,10,Q10)" type="button" value="Submit"/>
<input id="ansQ10" size="15" type="text"/>
</p></form>
::: textL30M30
5.11 Mark the result of throwing two dice as ( $x_1 , x_2$ ) and let
$A = \{ (x_{1} ,x_{2} ) | x_{1} + x_{2} =10 \}$,
$B = \{ (x _{1} ,x _{2} ) | x _{1} > x _{2} \}$. What is the value of
P(B\|A)?
:::
<form name="Q11">
<label><input name="item" type="radio" value="1"/> 1/3</label><br/>
<label><input name="item" type="radio" value="2"/> 1/12</label><br/>
<label><input name="item" type="radio" value="3"/> 5/12</label><br/>
<label><input name="item" type="radio" value="4"/> 1/2</label><br/>
<p>
<input onclick="radio(5,11,Q11)" type="button" value="Submit"/>
<input id="ansQ11" size="15" type="text"/>
</p></form>
:::
:::
## Discrete Random Variable
::: presentation-video-link
[presentation](pdf/0503.pdf){.presentation-link target="_blank"}
[video](https://youtu.be/DDISKMo7Iho){.video-link target="_blank"}
:::
::: mainTable
In case of statistical experiments which are frequently observed around
us, there are many similar probability calculations. For example, the
problem of tossing coins several times to see how many times the head
comes out is similar to counting how many defective products are made
from a product line. This problem is also similar to counting the number
of voters who support a particular candidate for the president. In this
section, the probability calculations as the previous examples, in
general the discrete sample spaces are discussed.
Consider a statistical experiment in which a coin is thrown repeatedly
two times. If the coin is ideal, the sample space for this experiment is
{'Tail-Tail', 'Tail-Head', 'Head-Tail', 'Head-Head'}. The
probability of an event in which each element of the sample space is
produced is 1/4 by the classical definition. In most cases, the fact
that we are interested in this example will be counting the number of
heads or tails. If $\small X$ is defined as 'the number of heads' in
this experiment, the possible value of $\small X$ can be 0, 1, or 2 and
we are interested in calculating probabilities that $\small X$=0,
$\small X$=1 or $\small X$=2. As such, a function that corresponds to
one real number between \[0,1\] for each element of the sample space is
called a random variable (see [Table 5.3]{.table-ref}.1).
:::
Table 5.3.1 Random variable $\small X$ = 'Number of Heads' when tossing
a coin twice'
-----------------------------------------------------------------------