Part 1

sample(1:6,1,replace=TRUE) draws a number from 1 to 6 equally likely in a random manner as that of tossing a dice once. Revise the Monte Carlo code of a coin toss in class to simulate the probability of getting a number 6 in one dice toss, e.g., P(getting a 6 in one toss). Assume the following three repeatition scenarions:

  1. set the replication n = 20, then simulate P(getting a 6 in one toss) using Method II;
n <- 20
dice <- 0
for (i in 1:n) {
  dice[i] <- sum(sample(1:6,1,replace=TRUE))
}
sixes <- sum(dice==6) # number of 6's rolled

pofsix <- sixes/n # probability of rolling a six
pofsix
## [1] 0.1
  1. set the replication n = 100, then simulate P(getting a 6 in one toss) using Method II;
n <- 100
dice <- 0
for (i in 1:n) {
  dice[i] <- sum(sample(1:6,1,replace=TRUE))
}
sixes <- sum(dice==6) # number of 6's rolled

pofsix <- sixes/n # probability of rolling a six
pofsix
## [1] 0.14
  1. set the replication n = 10000, then simulate P(getting a 6 in one toss) using Method II; What do you observe about the simulated probabilities as the number of replication increases from 20 to 10000?
n <- 10000
dice <- 0
for (i in 1:n) {
  dice[i] <- sum(sample(1:6,1,replace=TRUE))
}
sixes <- sum(dice==6) # number of 6's rolled

pofsix <- sixes/n # probability of rolling a six
pofsix
## [1] 0.1669

After changing replication to 10,000, we find that we come closer to the expected probability (16.6667%) at 16.75%

Part 2

1.9 A sample space has four elements 1, . . . , 4 such that 1 is twice as likely as 2, which is three times as likely as 3, which is four times as likely as 4. Find the probability function.

\[\Omega\ = \omega_1 + \omega_2 + \omega_3 + \omega_4 \\ \omega_1 = 48/100 \\ \omega_2 = 24/100 \\ \omega_3 = 16/100 \\ \omega_4 = 12/100\]

work written here

work written here

1.10 A random experiment has three possible outcomes a, b, and c, with P(a) = p, P(b) = p^2, and P(c) = p.

What choice(s) of p makes this a valid probability model?

\[P(a) + P(b) + P(c) = 1 \\ p + p^2 + p = 1 \\ P^2 +2p - 1 = 0 \\ p = \frac{-2 + \sqrt{8}}{2} = 0.4142136 \\ p = \frac{-2 - \sqrt{8}}{2} = -2.414214\]

p can only be equal to 0.4142136 because -2.4 is not a valid probability.

1.21 Suppose A and B are mutually exclusive, with P(A) = 0.30 and P(B) = 0.60. Find the probability that (a) At least one of the two events occurs (b) Both of the events occur

  1. P(A) + P(B) = 0.90

  2. \(P(A \cup B) = 0\) Because both events are mutually exclusive they both cannot occur

Part 3

(AB)^c

\((AB)^c\)

(A\cap\ B^c)

\((A\cap\ B^c)\)