{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Exercises ##"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Standard deck of cards:** From now on we will assume the following unless otherwise specified.\n",
"\n",
"- Cards being dealt from a deck means that the cards are drawn at random without replacement.\n",
"- A *hand* of cards is a subset dealt from the deck. The order in which the cards appear in the hand doesn't matter.\n",
"- A standard deck consists of 52 cards.\n",
" - There are 13 cards in each of 4 *suits*: clubs, spades, hearts, and diamonds. Clubs and spades are black. Hearts and diamonds are red.\n",
" - Each suit has 13 different *ranks*: Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King.\n",
" \n",
"**Important:** \n",
"- If you are trying to find the distribution of a random variable, **start with its possible values**, not the probabilities.\n",
"- Distributions can be described in a table, or by a formula, or in any other way that provides all the necessary information."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**1.** Cards are dealt from a standard deck until the first heart appears. Let $D$ be the number of cards dealt. Find the following probabilities.\n",
"\n",
"(a) $P(D = 5)$\n",
"\n",
"(b) $P(D \\le 5)$\n",
"\n",
"(c) $P(D = 3 \\mid D \\le 5)$"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**2.** The distribution table for a random variable $X$ is given below.\n",
"\n",
"|$x$ |$-2$|$-1$|$0$|$1$|$2$|\n",
"|---:|:---:|:---:|:---:|:---:|:---:|\n",
"|$P(X=x)$|$0.1$|$0.2$|$0.4$|$0.2$|$0.1$|\n",
"\n",
"(a) Fill in the blank with $=$ or $\\stackrel{d}{=}$, picking the stronger one if both are applicable, and leaving it blank if neither is applicable. Explain your choice.\n",
"\n",
"$X ~~ \\underline{~~~~~~~~~~~~~~} ~~ -X$\n",
"\n",
"(b) Draw a distribution table for $\\vert X \\vert$.\n",
"\n",
"(d) Draw a distribution table for $\\min(X, 1)$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**3.** Suppose you roll a die until the first time you see a face that has appeared before. Let $X$ be the number of rolls required. \n",
"\n",
"**a)** What are the possible values of $X$?\n",
"\n",
"**b)** Find the distribution of $X$.\n",
"\n",
"**c)** Find $P(X \\ge 4)$ using only multiplication, not addition. [Think about how the rolls have to come out for the event to occur.]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**4.** Cards are dealt from a standard deck. Let X be the number of cards dealt till the first time any suit appears more than once. For example, if the sequence of suits is clubs, diamonds, hearts, diamonds then $X=4$. Find the distribution of $X$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**5.** Let $X_1, X_2$ be the results of two draws made at random with replacement from the 10 digits $0, 1, 2, 3, 4, 5, 6, 7, 8, 9$. Define the following random variables.\n",
"\n",
"- $S = X_1 + X_2$\n",
"- $M = \\max(X_1, X_2)$\n",
"- $N = \\min(X_1, X_2)$\n",
"\n",
"(a) For each of the following pairs, fill in the blank with $=$ or $\\stackrel{d}{=}$, picking the stronger one if both are applicable, and leaving it blank if neither is applicable. Explain your choice.\n",
"\n",
"(i) $X_1 ~~ \\underline{~~~~~~~~~~~~~~} ~~ X_2$\n",
"\n",
"(ii) $S ~~ \\underline{~~~~~~~~~~~~~~} ~~ M+N$\n",
"\n",
"(b) Find $P(N > 3)$.\n",
"\n",
"(c) Find $P(S \\le 16)$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**6.** A population of 50 voters contains 30 from Party A and 20 from the rival Party B. Suppose you take a simple random sample of 10 voters. That's a sample drawn at random without replacement from the population, making all possible samples of size 10 equally likely.\n",
"\n",
"(a) How many possible samples are there?\n",
"\n",
"(b) Pick one of the options (i) and (ii) and explain your choice.\n",
"\n",
"The number of samples that contain 6 Party A voters is\n",
"\n",
"$~~~~~$ (i) $\\binom{30}{6}$ $~~~~~~~~~~$ (ii) $\\binom{30}{6}\\binom{20}{4}$\n",
"\n",
"(c) Let $N_A$ be the number of Party A voters in the sample. Find the distribution of $N_A$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**7.** A deck of five cards contains two aces and three queens. The five cards are shuffled and dealt one by one. This exercise is about the number of cards dealt till the aces appear. For example, if the order of the cards dealt was QAQQA, then the number of cards dealt until the first ace is $2$, and until the second ace is $5$.\n",
"\n",
"(a) Draw a table that displays the distribution of the number of cards dealt until the first ace.\n",
"\n",
"(b) Draw a table that displays the distribution of the number of cards dealt until the second ace.\n",
"\n",
"(c) Explain why the probabilities in the second table are just those in the first in a different order. [Hint: think about dealing off the bottom of the deck!]"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}