Bai Tap Numerical Analysis
Bai Tap Numerical Analysis
HOMEWORK 1
Chapter 1:
Q11. 3 novels, 2 mathematics books, and 1 chemistry book
a. Ways can the books be arranged on a bookshelf if the books can be arranged in any order:
6! = 720 ways
b. Ways can the books be arranged on a bookshelf if the mathematics books must be together and
the novels must be together:
2! × 3! × 1 × 6 = 72 ways
c. Ways can the books be arranged on a bookshelf if the novels must be together, but the other
books can be arranged in any order:
3! × 3! × 4 = 144
Q15. Handshakes take place if everyone shakes hands with everyone else in a group of 20 people:
(n2)=(202)= 2 !(20−2)=190
20 !
52 ! 39 ! 26 ! 52 !
= × × ×1 =
13! 39 ! 13 ! 26 ! 13 ! 13 ! ( 13! )4
Theoretical Exercise 8. To prove the identity:
Consider you have n red balls and m blue balls. You want to choose a total of r balls from them. Left-hand
side (LHS) counts the number of ways to choose r balls from the total of n+m balls. Right-hand side
(RHS) can be interpreted as follows:
(n0)( mr) :Choose 0 red balls and r blue balls. The number of ways to do this is(n0)( mr)
(n1)( r−1
m :
) Choose 1 red ball and r−1 blue balls. The number of ways to do this is(n1)( r−1
m
)
Continuing this pattern, the last term (nr)( m0 ) means choosing r red balls and 0 blue balls
When we sum up all these combinations, we're essentially counting all possible ways to choose r balls
from the combined set of n red balls and m blue balls, which is exactly what the LHS represents
Thus, the LHS is equal to the RHS, and the identity is proved
Chapter 2:
Q11. 28 percent of American males smoke cigarettes, 7 percent smoke cigars, and 5 percent smoke both
cigars and cigarettes
Denote:
C: Percentage of males who smoke cigars
C’ : Percentage of males who do not smoke cigars
S: Percentage of males who smoke cigarettes
S’ : Percentage of males who do not smoke cigarettes
B: Percentage of males who smoke both cigars and cigarettes
a. Percentage of males who smoke neither cigars nor cigarettes = C’ + S’
= 100% − (C + S − B) = 100% −(7% + 28% − 5%) = 100% − 30% = 70%
b. Percentage of males who smoke cigars but not cigarettes = C− B = 7% − 5% = 2%
Q18. The probability that two cards randomly selected from a standard deck form a blackjack is
64 64
Total number of possible outcomes 64
P(Blackjack) = = 52 = 52 ×51 =
Number of favorable outcomes ( ) 2 ¿ 1326
2
¿
Q28.
Without Replacement:
a. Probability that all three balls will be of the same color:
With Replacement:
a. Probability that all three balls will be of the same color:
( )( )( )
3 3 3
5 6 8 853
P(3 of same color) = + + =
19 19 19 6859
b. Probability that all three balls will be of different colors:
Q41.
The probability of getting a 6 at least once is equal to 1 minus the probability of not getting a 6 in any of
the rolls
5
The probability of not getting a 6 in one roll of a fair six-sided die is . Since each roll is independent,
6
4
5
the probability of not getting a 6 in all four rolls is
6
4
5 671
So, the probability of getting at least one 6 in four rolls = 1− =
6 1296
Theoretical Exercise 5.
Chapter 3:
Q5. P(First 2 white, Last 2 black) = ( 156 × 145 ) ×( 139 × 128 )= 916
Q10.
13 1
P(A): Probability that the first card selected is a spade = =
52 4
P(B|A): Probability that the second and third cards are spades given that the first card selected is a spade
12 11
= ×
51 50
P(B): Probability that the second and third cards are spades =
( 2)
12
(512)
12 11 1
× ×
51 50 4
P(A|B) =
P (B∨ A)× P( A)
P (B)
=
12
2
=¼ ( )
(512)
Q16.
Given:
P(S) = 0.32 (Probability that a woman of childbearing age is a smoker)
P(E∣S) = 2 × P(E∣NS) (Probability of ectopic pregnancy given smoker
1
P(E∣NS) = × P(E∣S) (Probability of ectopic pregnancy given nonsmoker)
2
Using Bayes' theorem, we have:
P ( E∨S)× P(S)
P(S∣E) =
P(E)
We know that:
P(E) = P(E∣S) × P(S) + P(E∣NS) × P(NS)
We can rewrite P(E) using P(NS) = 1 − P(S) = 1 − 0.32 = 0.68:
P(E) = P(E∣S) × 0.32 + P(E∣NS) × 0.68
1
Substituting P(E∣NS) = × P(E∣S):
2
1
P(E) = P(E|S) × 0.32 + × P(E|S) × 0.68
2
P(E) = 0.66× P(E|S)
P ( E|S ) × P ( S ) 0.32
P(S|E) = = = 0.48
P ( E) 0.66
Q18.
Denote:
D: the event that a randomly selected family owns a dog
C: the event that a randomly selected family owns a cat
Given:
P(D) = 0.36
P(C|D) = 0.22
P(C) = 0.30
a. The probability that a randomly selected family owns both a dog and a cat:
P ( D∩C ) = P(D) ×P(C|D) = 0.36 × 0.22 = 0.0792
b. The conditional probability that a randomly selected family owns a dog given that it owns a cat:
P ( D ∩C ) 0.0792
P(D|C) = =
P (C ) 0.30
Q22.
Denote:
H 1: Husband earns less than $125000
P (W 2)= ( 23 × 13 )+( 13 × 23 )= 29 + 29 = 49
b. Conditional probability that the transferred ball was white given that a white ball is selected from
Urn II:
2 1
P ( W 2|W 1 ) × P ( W 1 ) 3 × 3 2 1
P ( W 1|W 2 ) = = = =
P (W 2) 4 4 2
9
Q28.
Denote:
M: The event that the person selected is male
F: The event that the person selected is female
CB: The event that the person selected is color blind
Given:
P(M) = P(F)
P(CB|M) = 0.05
P(CB|F) = 0.0025
a. Probability of the selected color-blind person being male:
P ( CB|M ) × P ( M )
P ( M|CB )=
P ( CB )
P ( CB )=P ( CB| M ) × P ( M ) + P ( CB|F ) × P ( F )
¿ P ( CB| M ) × P ( M ) + P ( CB|F ) × P ( M )
¿ P ( M ) ×(P ( CB| M )+ P (CB∨F))
¿ 0.5 × ( 0.05+ 0.0025 )
¿ 0 .02625
0.05× 0.5
P ( M|CB )=
0.02625
b. Probability of the selected color-blind person being male if the population consisted of twice as
many males as females:
In this case, P(M) = 2×P(F)
Using similar calculations as above, we can find:
P(CB) = P(M) ×(P(CB|M) + P(CB|F)
P(CB) = (2× P(F)) × (0.05 + 0.0025)
P(CB) = (2 ×0.5) × (0.05+0.0025) = 0.055
0.05 ×1
P(M|CB) =
0.055
Q35.
Denote:
R: It rains tomorrow
E: Joe is early tomorrow
L: Joe is late to work
Given:
P(L|R) = 0.3
P(L|-R) = 0.1
P(R) = 0.7
a. Probability that Joe is early tomorrow:
P ( E )=1−P ( L )
P ( L )=P ( L|R ) × P ( R )+ P ( L|−R ) × P (−R )
¿ 0.3 × 0.7+0.1 ×0.3=0.24
P ( E )=1−0.24=0.76
b. Conditional probability that it rained given Joe was early:
P ( E|R ) × P ( R )
P ( R|E ) =
P (E )
P ( E|R ) =1−P ( L|R )=1−0.3=0.7
P ( E )=P ( E|R ) × P ( R )+ P ( E|−R ) × P (−R )
¿ 0.7 × 0.7+1 ×0.3=0.49+0.3=0.79
0.7 × 0.7 0.49
P ( R|E ) = =
0.79 0.79
Theoretical Exercise 1.
To prove the inequality P ( AB∨A ) ≥ P ( A B| AUB ), we can use the definition of conditional probability
and set theory.
By definition, conditional probability is given by:
P ( AB )
P ( AB| A )=
P ( A)
Similarly,
P ( AB )
P ( AB| A U B )=
P ( A UB )
Since P(A) > 0, we can multiply both sides by P(A) to simplify the inequality:
P ( AB ) P ( A )
P ( AB ) ≥
P ( AUB )
Now, if we multiply both sides by P(AUB), the inequality will still hold as long as P(AUB) > 0:
P ( AB ) P ( AUB ) ≥ P ( AB ) P( A)
This inequality holds true because P ( AUB ) ≥ P( A) , as AUB contains all elements in A and potentially
more. Therefore, the inequality P ( AB∨A ) ≥ P ( A B| AUB ) is proven
Theoretical Exercise 6.