#11 and #14 on page 303 of probability text #1 on page 320-321
11 We have two coins: one is a fair coin and the other is a coin that produces heads with probability 3/4. One of the two coins is picked at random, and this coin is tossed n times. Let Sn be the number of heads that turns up in these n tosses. Does the Law of Large Numbers allow us to predict the proportion of heads that will turn up in the long run? After we have observed a large number of tosses, can we tell which coin was chosen? How many tosses suffice to make us 95 percent sure?
11a The law of large numbers will not help us predict at the outset, but it will become more apparent through repeated experiment which coin was selected.
The maximum \(0 \le p \le 1\) value that can obtained from the distribution of \(p(1-p) = p-p^2\) after taking the derivative is \(1 - 2p=0 = p =1/2\) Therefore to maximize \(\epsilon\) in the function \(\frac{\sigma^2}{\epsilon^2 (1-p)}\) we will apply that variance which evaluates to \(\frac{1}{4\epsilon^2 (1-p)}\) If the law of large numbers assumes the proportion will become either .75 or 0.5 the average value of those two percentages is .625 which is the center point so we would want our error term to be .125 away from .625. It must be equal to 0.05 to help us determine the correct n value to be 95 % confident.
0.05 = 1/4n(.125**2)
1/(4*(.125**2))/0.05
## [1] 320
n> 320 so rounding up gets us 321 tosses to have a 95% confidence level.
\(P(|X − E(X)| ≥ \epsilon) \le \frac{V(X)}{\epsilon^2}\)
\(\frac{1}{\epsilon} E(|X − E(X)|) = \frac{V(X)}{\epsilon^2}\)
The expected difference from the mean is not supposed to be that large as n approaches infinity and ordinarily when calculating the variance we would square the differences to capture the spread from both positive and negative differences. In this case since we are taking the absolute value we are not getting the total variance from the difference of the mean but something similar to the standard deviation to approximate the spread and dividing by the sqrt of the acceptable error.
1 Let X be a continuous random variable with mean \(\mu = 10\) and variance \(\sigma^2 = \frac{100}{3}\)
Using Chebyshev’s Inequality, find an upper bound for the following probabilities.
\(\frac{\sigma^2}{k^2}\)
mean <- 10
var <- 100/3
ep_a <- 2
var/ep_a**2
## [1] 8.333333
sqrt(var)/sqrt(ep_a)
## [1] 4.082483
Since the bound predicted is greater than 1 we must assume the max probability is 1 to conform to a valid probability distribution
ep_b <- 5
var/ep_b**2
## [1] 1.333333
Since the value predicted is greater than 1 we must assume the max probability is 1 to conform to a valid probability distribution
ep_c <- 9
var/ep_c**2
## [1] 0.4115226
sqrt(var)/ep_c
## [1] 0.6415003
ep_d <- 20
var/ep_d**2
## [1] 0.08333333