Suppose that an unfair coin comes up heads 54.1% of the time. The coin is flipped a total of 13 times.

a) What is the probability that you get exactly 6 heads?
b) What is the probability that you get exactly 6 tails?
c) What is the probability that you get at most 9 tails?

We would use the binomial expansion of

(0.541+0.459)^13, where n=13.

The probability of r occurrences of head is given by (n,r)(0.541)^r(0.459)^(n-r), where (n,r) stands for "n choose r" or
(n,r)=n!/(r!(n-r)!).

(a) For 6 heads, r=6, n=13
P(6H)=(13,6)0.541^6*0.459^7
=1716*0.02507*.004292
=0.1847

(b) exactly 6 tails is the same as exactly 7 heads, so calculate P(7H) using the above formula.

(c) at most 9 tails means at least 4 heads.

P(≤9T)
=P(≥4H)
=P'(<4H)
By Kolmogorov's second axiom, we can write
=1-P(<4H)
=1-(P(0H)+P(1H)+P(2H)+P(3H))

Note: You can view Kolmogorov's second axiom at:
http://mathworld.wolfram.com/KolmogorovsAxioms.html

To find the probabilities, we can use the binomial probability formula, which is given by:

P(X = k) = (nCk) * (p^k) * ((1-p)^(n-k))

where:
- P(X = k) is the probability of getting exactly k successes
- nCk is the number of ways to choose k items from a set of n items (also called combinations)
- p is the probability of getting a success on each trial
- (1-p) is the probability of not getting a success on each trial
- k is the number of successes we are interested in
- n is the total number of trials

a) Probability of getting exactly 6 heads:
Here, k = 6 (number of heads), n = 13 (total number of trials), and p = 0.541 (probability of getting a head).

Using the formula, we have:
P(X = 6) = (13C6) * (0.541^6) * ((1-0.541)^(13-6))

To compute this, we need to evaluate (13C6), which is calculated as:
(13C6) = 13! / (6! * (13-6)!)

The exclamation mark (!) denotes the factorial notation, which means multiplying a positive integer by all the positive integers less than it down to 1. For example, 5! = 5 * 4 * 3 * 2 * 1 = 120.

Therefore, to find the probability of getting exactly 6 heads, we need to calculate:
P(X = 6) = (13! / (6! * 7!)) * (0.541^6) * ((1-0.541)^(13-6))

b) Probability of getting exactly 6 tails:
Since the coin is unfair and comes up heads 54.1% of the time, the probability of getting tails on each flip is given by (1-0.541) = 0.459.

Using the same formula as before, but now with k = 6 tails, n = 13 trials, and p = 0.459, we have:
P(X = 6) = (13C6) * (0.459^6) * ((1-0.459)^(13-6))

c) Probability of getting at most 9 tails:
To find the probability of getting at most 9 tails, we need to sum up the probabilities of getting 0, 1, 2, ..., 9 tails.

P(X <= 9) = P(X = 0) + P(X = 1) + P(X = 2) + ... + P(X = 9)

Using the same formula as before, but now with p = 0.459 and n ranging from 0 to 9, we can calculate each term in the sum and add them up to get the final probability.