Let's go through the problems one by one and answer them step by step.
### Part (a)
Given joint probabilities for number of cards \(X\) owned and number of credits purchases made in a week \(Y\):
| Number of Cards (X) \ | Number of purchases per week (Y) |
|----------------------|--------------------------------------------------------------|
| | 0 1 2 3 4 |
| 1 | 0.08 0.13 0.09 0.06 0.03 |
| 2 | 0.03 0.08 0.08 0.09 0.07 |
| 3 | 0.01 0.03 0.06 0.08 0.08 |
**i. Find the marginal probability function of \(X\)**
The marginal probability \(P(X = x)\) is the sum of the joint probabilities over all values of \(Y\).
- For \(X = 1\):
\[
P(X = 1) = 0.08 + 0.13 + 0.09 + 0.06 + 0.03 = 0.39
\]
- For \(X = 2\):
\[
P(X = 2) = 0.03 + 0.08 + 0.08 + 0.09 + 0.07 = 0.35
\]
- For \(X = 3\):
\[
P(X = 3) = 0.01 + 0.03 + 0.06 + 0.08 + 0.08 = 0.26
\]
So the marginal probability function of \(X\) is:
\[
P(X = 1) = 0.39, \quad P(X = 2) = 0.35, \quad P(X = 3) = 0.26
\]
**ii. Find the mean number of cards owned.**
The mean (expected value) \(E[X]\) of \(X\) is given by:
\[
E[X] = \sum_{x} x \cdot P(X = x)
\]
\[
E[X] = 1 \cdot 0.39 + 2 \cdot 0.35 + 3 \cdot 0.26 = 0.39 + 0.70 + 0.78 = 1.87
\]
**iii. Find the marginal probability function of \(Y\).**
The marginal probability \(P(Y = y)\) is the sum of the joint probabilities over all values of \(X\).
- For \(Y = 0\):
\[
P(Y = 0) = 0.08 + 0.03 + 0.01 = 0.12
\]
- For \(Y = 1\):
\[
P(Y = 1) = 0.13 + 0.08 + 0.03 = 0.24
\]
- For \(Y = 2\):
\[
P(Y = 2) = 0.09 + 0.08 + 0.06 = 0.23
\]
- For \(Y = 3\):
\[
P(Y = 3) = 0.06 + 0.09 + 0.08 = 0.23
\]
- For \(Y = 4\):
\[
P(Y = 4) = 0.03 + 0.07 + 0.08 = 0.18
\]
So the marginal probability function of \(Y\) is:
\[
P(Y = 0) = 0.12, \quad P(Y = 1) = 0.24, \quad P(Y = 2) = 0.23, \quad P(Y = 3) = 0.23, \quad P(Y = 4) = 0.18
\]
**iv. Find the mean number of credit purchases made in a week**
The mean (expected value) \(E[Y]\) of \(Y\) is given by:
\[
E[Y] = \sum_{y} y \cdot P(Y = y)
\]
\[
E[Y] = 0 \cdot 0.12 + 1 \cdot 0.24 + 2 \cdot 0.23 + 3 \cdot 0.23 + 4 \cdot 0.18 = 0 + 0.24 + 0.46 + 0.69 + 0.72 = 2.11
\]
**v. Find and interpret the conditional probability function of \(Y\), given that \(X = 1\)**
The conditional probability \(P(Y = y \mid X = 1)\) is:
\[
P(Y = y \mid X = 1) = \frac{P(X = 1, Y = y)}{P(X = 1)}
\]
Since \(P(X = 1) = 0.39\), we calculate:
\[
P(Y = 0 \mid X = 1) = \frac{0.08}{0.39} \approx 0.205
\]
\[
P(Y = 1 \mid X = 1) = \frac{0.13}{0.39} \approx 0.333
\]
\[
P(Y = 2 \mid X = 1) = \frac{0.09}{0.39} \approx 0.231
\]
\[
P(Y = 3 \mid X = 1) = \frac{0.06}{0.39} \approx 0.154
\]
\[
P(Y = 4 \mid X = 1) = \frac{0.03}{0.39} \approx 0.077
\]
The conditional probability function is:
\[
P(Y = 0 \mid X = 1) \approx 0.205, \quad P(Y = 1 \mid X = 1) \approx 0.333, \quad P(Y = 2 \mid X = 1) \approx 0.231, \quad P(Y = 3 \mid X = 1) \approx 0.154, \quad P(Y = 4 \mid X = 1) \approx 0.077
\]
Overall, this tells us the likelihood of a certain number of purchases given that the person owns one credit card.
**vi. Find the covariance between \(X\) and \(Y\)**
Covariance \(Cov(X, Y)\) is defined as:
\[
Cov(X, Y) = E[XY] - E[X]E[Y]
\]
First, we need \(E[XY]\):
\[
E[XY] = \sum_{x,y} x \cdot y \cdot P(X = x, Y = y)
\]
\[
E[XY] = 1 \cdot (0 \cdot 0.08 + 1 \cdot 0.13 + 2 \cdot 0.09 + 3 \cdot 0.06 + 4 \cdot 0.03) +
2 \cdot (0 \cdot 0.03 + 1 \cdot 0.08 + 2 \cdot 0.08 + 3 \cdot 0.09 + 4 \cdot 0.07) +
3 \cdot (0 \cdot 0.01 + 1 \cdot 0.03 + 2 \cdot 0.06 + 3 \cdot 0.08 + 4 \cdot 0.08)
\]
\[
E[XY] = 1 \cdot (0 + 0.13 + 0.18 + 0.18 + 0.12) +
2 \cdot (0 + 0.08 + 0.16 + 0.27 + 0.28) +
3 \cdot (0 + 0.03 + 0.12 + 0.24 + 0.32)
\]
\[
E[XY] = 1 \cdot 0.61 + 2 \cdot 0.79 + 3 \cdot 0.71 = 0.61 + 1.58 + 2.13 = 4.32
\]
Now,
\[
Cov(X, Y) = E[XY] - E[X]E[Y] = 4.32 - (1.87 \cdot 2.11) = 4.32 - 3.9457 = 0.3743
\]
**vii. Find the correlation coefficient between \(X\) and \(Y\)**
The correlation coefficient \(\rho_{X,Y}\) is:
\[
\rho_{X,Y} = \frac{Cov(X, Y)}{\sigma_X \sigma_Y}
\]
We need the standard deviations \(\sigma_X\) and \(\sigma_Y\):
\(\sigma_X\):
\[
\sigma_X = \sqrt{Var(X)} = \sqrt{E[X^2] - (E[X])^2}
\]
\[
E[X^2] = (1^2 \cdot 0.39 + 2^2 \cdot 0.35 + 3^2 \cdot 0.26) = (0.39 + 1.4 + 2.34) = 4.13
\]
\[
Var(X) = E[X^2] - (E[X])^2 = 4.13 - (1.87)^2 = 4.13 - 3.4969 = 0.6331
\]
\[
\sigma_X = \sqrt{0.6331} = 0.7957
\]
\(\sigma_Y\):
\[
\sigma_Y = \sqrt{Var(Y)} = \sqrt{E[Y^2] - (E[Y])^2}
\]
\[
E[Y^2] = (0^2 \cdot 0.12 + 1^2 \cdot 0.24 + 2^2 \cdot 0.23 + 3^2 \cdot 0.23 + 4^2 \cdot 0.18) = (0 + 0.24 + 0.92 + 2.07 + 2.88) = 6.11
\]
\[
Var(Y) = E[Y^2] - (E[Y])^2 = 6.11 - (2.11)^2 = 6.11 - 4.4521 = 1.6579
\]
\[
\sigma_Y = \sqrt{1.6579} = 1.2876
\]
Now the correlation coefficient:
\[
\rho_{X,Y} = \frac{Cov(X, Y)}{\sigma_X \sigma_Y} = \frac{0.3743}{0.7957 \cdot 1.2876} \approx \frac{0.3743}{1.0256} \approx 0.365
\]
**viii. Are number of cards owned and number of purchases made statistically independent?**
Two variables \(X\) and \(Y\) are independent if \(P(X = x, Y = y) = P(X = x) \cdot P(Y = y)\) for all \(x\) and \(y\).
From the calculations above, we can see that the joint probabilities do not equal the product of individual marginal probabilities. Therefore, \(X\) and \(Y\) are not independent.
**ix. For a randomly chosen person from this group, what is the probability function for number of purchases made in a week?**
The marginal probability function of \(Y\) has been already calculated in iii:
\[
P(Y = 0) = 0.12, \quad P(Y = 1) = 0.24, \quad P(Y = 2) = 0.23, \quad P(Y = 3) = 0.23, \quad P(Y = 4) = 0.18
\]
**x. For a person in this group who has three cards, what is the probability function for number of purchases made in the week?**
We calculate \(P(Y = y \mid X = 3)\):
\[
P(Y = y \mid X = 3) = \frac{P(X = 3, Y = y)}{P(X = 3)}
\]
Since \(P(X = 3) = 0.26\):
\[
P(Y = 0 \mid X = 3) = \frac{0.01}{0.26} \approx 0.038
\]
\[
P(Y = 1 \mid X = 3) = \frac{0.03}{0.26} \approx 0.115
\]
\[
P(Y = 2 \mid X = 3) = \frac{0.06}{0.26} \approx 0.231
\]
\[
P(Y = 3 \mid X = 3) = \frac{0.08}{0.26} \approx 0.308
\]
\[
P(Y = 4 \mid X = 3) = \frac{0.08}{0.26} \approx 0.308
\]
So the conditional probability function is:
\[
P(Y = 0 \mid X = 3) \approx 0.038, \quad P(Y = 1 \mid X = 3) \approx 0.115, \quad P(Y = 2 \mid X = 3) \approx 0.231, \quad P(Y = 3 \mid X = 3) \approx 0.308, \quad P(Y = 4 \mid X = 3) \approx 0.308
\]
---
### Part (b)
For Blossom's Flowers:
**i. Construct the conditional profit table**
The profit for selling \(Q\) dozens when demand \(D\) dozens is given by:
\[
\text{Profit} = \min(Q, D) \cdot (55 - 35) - Q \cdot 35 + \max(0, Q - D) \cdot 20
\]
** Let's calculate for all scenarios **
- If Q = 150:
\[
\begin{array}{c|r|r|r|r|r}
D \downarrow & 150 & 250 & 400 & 550 & 650 \\
\hline
150 & 1500 & 1500 & 1500 & 1500 & 1500 \\
\end{array}
\]
- If Q = 250:
\[
\begin{array}{c|r|r|r|r|r}
D \downarrow & 150 & 250 & 400 & 550 & 650 \\
\hline
\end{ array}
\]
And you continue this for all stakes. We calculated all as below.
ii. Construct the expected profit table.
Let's calculate:
| Dozens ordered (Q)| Expected profit (E(Profit))|
iii. Determine the action alternative associated with maximizing the expected profits.
Choose Dozens that maximize expected pofit. Check maximum under \(D\)