<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>geometric random variable &#8211; Problems in Mathematics</title>
	<atom:link href="https://yutsumura.com/tag/geometric-random-variable/feed/" rel="self" type="application/rss+xml" />
	<link>https://yutsumura.com</link>
	<description></description>
	<lastBuildDate>Wed, 05 Feb 2020 05:38:49 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3.6</generator>

<image>
	<url>https://i2.wp.com/yutsumura.com/wp-content/uploads/2016/12/cropped-question-logo.jpg?fit=32%2C32&#038;ssl=1</url>
	<title>geometric random variable &#8211; Problems in Mathematics</title>
	<link>https://yutsumura.com</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">114989322</site>	<item>
		<title>Conditional Probability When the Sum of Two Geometric Random Variables Are Known</title>
		<link>https://yutsumura.com/conditional-probability-when-the-sum-of-two-geometric-random-variables-are-known/</link>
				<comments>https://yutsumura.com/conditional-probability-when-the-sum-of-two-geometric-random-variables-are-known/#comments</comments>
				<pubDate>Wed, 05 Feb 2020 05:33:15 +0000</pubDate>
		<dc:creator><![CDATA[Yu]]></dc:creator>
				<category><![CDATA[Probability]]></category>
		<category><![CDATA[conditional probability]]></category>
		<category><![CDATA[geometric distribution]]></category>
		<category><![CDATA[geometric random variable]]></category>
		<category><![CDATA[independent random variable]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">https://yutsumura.com/?p=7244</guid>
				<description><![CDATA[<p>Let $X$ and $Y$ be geometric random variables with parameter $p$, with $0 \leq p \leq 1$. Assume that $X$ and $Y$ are independent. Let $n$ be an integer greater than $1$. Let $k$&#46;&#46;&#46;</p>
<p>The post <a href="https://yutsumura.com/conditional-probability-when-the-sum-of-two-geometric-random-variables-are-known/" target="_blank">Conditional Probability When the Sum of Two Geometric Random Variables Are Known</a> first appeared on <a href="https://yutsumura.com/" target="_blank">Problems in Mathematics</a>.</p>]]></description>
								<content:encoded><![CDATA[<h2> Problem 755</h2>
<p>Let $X$ and $Y$ be geometric random variables with parameter $p$, with $0 \leq p \leq 1$. Assume that $X$ and $Y$ are independent. </p>
<p>Let $n$ be an integer greater than $1$. Let $k$ be a natural number with $k\leq n$. Then prove the formula<br />
		\[P(X=k \mid X + Y = n) = \frac{1}{n-1}.\]
<p><span id="more-7244"></span><br />

<h2>Hint.</h2>
<p>If this problem is a bit abstract for you, then you might want to try the following problem, which is more concrete.</p>
<p><a href="https://yutsumura.com/probability-that-alice-tossed-a-coin-three-times-if-alice-and-bob-tossed-totally-7-times/" rel="noopener noreferrer" target="_blank">Probability that Alice Tossed a Coin Three Times If Alice and Bob Tossed Totally 7 Times</a></p>
<h2>Solution.</h2>
<p>			The definition of a conditional probability yields<br />
			\[P(X=k \mid X + Y = n) = \frac{P\left((X=k) \cap (X+Y=n)\right)}{P(X+Y=n)} \tag{*}\]
			We first compute the numerator of the last expression. We have<br />
			\begin{align*}<br />
				&#038;P\left((X=k) \cap (X+Y=n)\right)\\<br />
				&#038;= P\left((X=k) \cap (Y=n-X)\right)\\<br />
				&#038;= P\left((X=k) \cap (Y=n-k)\right)\\<br />
				&#038;= P(X=k) \cdot P(Y=n-k).<br />
			\end{align*}<br />
			Here, the last step follows because $X$ and $Y$ are independent.</p>
<hr />
<p>			Now, as $X$ and $Y$ are geometric random variables with parameter $p$, we see that by putting $q=1-p$<br />
			\begin{align*}<br />
			P(X=k) &#038;= q^{k-1}p \\<br />
			P(Y= n &#8211; k) &#038;= q^{n-k-1}p.<br />
			\end{align*}<br />
			Hence, the numerator becomes<br />
			\begin{align*}<br />
				&#038;P\left((X=k) \cap (X+Y=n)\right)\\<br />
				&#038;= P(X=k) \cdot P(Y=n-k)\\<br />
				&#038;= q^{k-1}p \cdot q^{n-k-1}p\\<br />
				&#038;= q^{n-2}p^2.<br />
			\end{align*}</p>
<hr />
<p>			Next, we compute the denominator of (*). Applying the law of total probability, we get<br />
			\begin{align*}<br />
				P(X+Y=n) &#038;= \sum_{k=1}^{n-1} P(X=k) P(X+Y=n \mid X=k). \tag{**}<br />
			\end{align*}<br />
			The probability $P(X+Y=n \mid X=k)$ can be computed as follows.<br />
			\begin{align*}<br />
			&#038;P(X+Y=n \mid X=k)\\<br />
			&#038;= P(Y = n-X \mid X=k)\\<br />
			&#038;= P(Y=n-k \mid X=k)\\<br />
			&#038;= P(Y=n-k).<br />
			\end{align*}<br />
			The last step follows because $X$ and $Y$ are independent. Then the equation (**) becomes<br />
			\begin{align*}<br />
				P(X+Y=n) &#038;= \sum_{k=1}^{n-1} P(X=k) \cdot P(Y=n-k) \\				&#038;= \sum_{k=1}^{n-1} q^{k-1}p  \cdot q^{n-k-1}p\\<br />
				&#038;= \sum_{k=1}^{n-1} q^{n-2} p^2\\<br />
				&#038;= (n-1)q^{n-2}p^2.<br />
			\end{align*}</p>
<hr />
<p>			Combining the computations of the numerator and the denominator, we obtain the desired probability from (*).<br />
			\begin{align*}<br />
				P(X=k \mid X + Y = n) &#038;= \frac{P\left((X=k) \cap (X+Y=n)\right)}{P(X+Y=n)}\\<br />
				&#038;= \frac{q^{n-2}p^2}{(n-1)q^{n-2}p^2}\\<br />
				&#038;= \frac{1}{n-1}.<br />
			\end{align*}<br />
			This completes the proof of the formula<br />
			\[P(X=k \mid X + Y = n) = \frac{1}{n-1}.\]
<h2>Application</h2>
<p>As an application of this problem, solve the next problem.</p>
<div style="padding: 16px; border: none 3px #4169e1; border-radius: 10px; background-color: #f0f8ff; margin-top: 30px; margin-bottom: 30px;">
<strong>Problem</strong>.<br />
Alice tossed a fair coin until a head occurred. Then Bob tossed the coin until a head occurred. Suppose that the total number of tosses for Alice and Bob was $7$. </p>
<p>Assuming that each toss is independent of each other, what is the probability that Alice tossed the coin exactly three times?
</p></div>
<p>Its solution is available in the post <a href="https://yutsumura.com/probability-that-alice-tossed-a-coin-three-times-if-alice-and-bob-tossed-totally-7-times/" rel="noopener noreferrer" target="_blank">Probability that Alice Tossed a Coin Three Times If Alice and Bob Tossed Totally 7 Times</a>.</p>
<button class="simplefavorite-button has-count" data-postid="7244" data-siteid="1" data-groupid="1" data-favoritecount="2" style="">Click here if solved <i class="sf-icon-star-empty"></i><span class="simplefavorite-button-count" style="">2</span></button><p>The post <a href="https://yutsumura.com/conditional-probability-when-the-sum-of-two-geometric-random-variables-are-known/" target="_blank">Conditional Probability When the Sum of Two Geometric Random Variables Are Known</a> first appeared on <a href="https://yutsumura.com/" target="_blank">Problems in Mathematics</a>.</p>]]></content:encoded>
							<wfw:commentRss>https://yutsumura.com/conditional-probability-when-the-sum-of-two-geometric-random-variables-are-known/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">7244</post-id>	</item>
		<item>
		<title>Probability that Alice Tossed a Coin Three Times If Alice and Bob Tossed Totally 7 Times</title>
		<link>https://yutsumura.com/probability-that-alice-tossed-a-coin-three-times-if-alice-and-bob-tossed-totally-7-times/</link>
				<comments>https://yutsumura.com/probability-that-alice-tossed-a-coin-three-times-if-alice-and-bob-tossed-totally-7-times/#comments</comments>
				<pubDate>Sat, 01 Feb 2020 00:38:51 +0000</pubDate>
		<dc:creator><![CDATA[Yu]]></dc:creator>
				<category><![CDATA[Probability]]></category>
		<category><![CDATA[conditional probability]]></category>
		<category><![CDATA[geometric distribution]]></category>
		<category><![CDATA[geometric random variable]]></category>
		<category><![CDATA[probability]]></category>

		<guid isPermaLink="false">https://yutsumura.com/?p=7228</guid>
				<description><![CDATA[<p>Alice tossed a fair coin until a head occurred. Then Bob tossed the coin until a head occurred. Suppose that the total number of tosses for Alice and Bob was $7$. Assuming that each&#46;&#46;&#46;</p>
<p>The post <a href="https://yutsumura.com/probability-that-alice-tossed-a-coin-three-times-if-alice-and-bob-tossed-totally-7-times/" target="_blank">Probability that Alice Tossed a Coin Three Times If Alice and Bob Tossed Totally 7 Times</a> first appeared on <a href="https://yutsumura.com/" target="_blank">Problems in Mathematics</a>.</p>]]></description>
								<content:encoded><![CDATA[<h2> Problem 752</h2>
<p>Alice tossed a fair coin until a head occurred. Then Bob tossed the coin until a head occurred. Suppose that the total number of tosses for Alice and Bob was $7$. </p>
<p>Assuming that each toss is independent of each other, what is the probability that Alice tossed the coin exactly three times?</p>
<p><span id="more-7228"></span><br />

<h2>Hint.</h2>
<p>Let $X$ be the number of Alice&#8217;s tosses until she got a head.</p>
<p>Then $X$ is a geometric random variable with parameter $p=1/2$.<br />
Recall that a geometric random variable can be interpreted as the number of trials until getting the first success and each trial is successful with probability $p$ and fails with probability $q=1-p$.</p>
<p>Note that<br />
\[P(X=k)= q^{k-1} p = (1-p)^{k-1} p.\]
<h2>Solution.</h2>
<p>			Let $X$ be the number of Alice&#8217;s tosses until she got a head. Also, let $Y$ be the number of Bob&#8217;s tosses until he got a head. As each toss is an independent event and the coin is fair, the random variables $X$ and $Y$ are geometric with parameter $p=1/2$ (the probability of success(head) is $p=1/2$ and the probability of failure(tail) is $1-p=1/2$). </p>
<p>			This question asks to find the conditional probability<br />
			\[P(X=3 \mid X+Y=7) = \frac{P\left((X=3) \cap (X+Y=7) \right)}{P(X+Y=7)}.\]
<p>			Let us first compute the numerator as follows.<br />
			\begin{align*}<br />
				P\left((X=3) \cap (X+Y=7) \right) &#038;= P\left((X=3) \cap (Y=7-X) \right) \\<br />
				&#038;= P\left((X=3) \cap (Y=4) \right) \\<br />
				&#038;= P(X=3) \cdot P(Y=4)<br />
			\end{align*}<br />
			since $X$ and $Y$ are independent.</p>
<p>			Now, as $X$ and $Y$ follow the geometric distribution with parameter $p$, we have<br />
			\begin{align*}<br />
			P(X=3) &#038;= \left(\frac{1}{2}\right)^2 \frac{1}{2} = \frac{1}{2^3}\\<br />
			P(Y=4) &#038;= \left(\frac{1}{2}\right)^3 \frac{1}{2} = \frac{1}{2^4}.<br />
			\end{align*}<br />
			The product of these gives the numerator $\frac{1}{2^7}$.</p>
<hr />
<p>			Next, let us calculate the denominator $P(X+Y=7)$.<br />
			The law of total probability yields<br />
			\begin{align*}<br />
				P(X+Y=7) = \sum_{k=1}^6 P(X=k) P(X+Y = 7 \mid X=k).<br />
			\end{align*}</p>
<p>			As before, since $X$ is a geometric random variable with parameter $p=1/2$, we have<br />
			\[P(X=k) = \left(\frac{1}{2}\right)^{k-1} \frac{1}{2} = \frac{1}{2^k}.\]
<hr />
<p>			The second factor $P(X+Y \mid X= k)$ can be computed as follows.<br />
			\begin{align*}<br />
			&#038;P(X+Y = 7 \mid X= k)\\<br />
			&#038;= P(Y	= 7 &#8211; X \mid X = k)\\<br />
			&#038;= P(Y	= 7 &#8211; k \mid X = k)\\<br />
			&#038;= P(Y=7 &#8211; k)\\<br />
			&#038;= \left(\frac{1}{2}\right)^{(7-k)-1} \frac{1}{2} = \frac{1}{2^{7-k}}<br />
			\end{align*}<br />
			Here, the third equality follows because $X$ and $Y$ are independent.</p>
<p>			It follows that the denominator becomes<br />
			\begin{align*}<br />
			P(X+Y=7) &#038;= \sum_{k=1}^6 \frac{1}{2^k} \cdot \frac{1}{2^{7-k}}\\<br />
			&#038;=	\sum_{k=1}^6 \frac{1}{2^7}\\<br />
			&#038;= \frac{6}{2^7}.<br />
			\end{align*}</p>
<hr />
<p>			Combining these computations, it follows that the desired conditional probability is<br />
			\begin{align*}<br />
				P(X=3 \mid X+Y=7) = \frac{1/2^7}{6/2^7}=\frac{1}{6}.<br />
			\end{align*}</p>
<h2>Abstraction</h2>
<p>If you solved this problem, then try the following problem as well. This is more abstract than the current problem but the idea is the same.</p>
<div style="padding: 16px; border: none 3px #4169e1; border-radius: 10px; background-color: #f0f8ff; margin-top: 30px; margin-bottom: 30px;">
<strong>Problem</strong>.<br />
Let $X$ and $Y$ be geometric random variables with parameter $p$, with $0 \leq p \leq 1$. Assume that $X$ and $Y$ are independent. </p>
<p>Let $n$ be an integer greater than $1$. Let $k$ be a natural number with $k\leq n$. Then prove the formula<br />
		\[P(X=k \mid X + Y = n) = \frac{1}{n-1}.\]
</p></div>
<p>Its solution can be found in the post: <a href="https://yutsumura.com/conditional-probability-when-the-sum-of-two-geometric-random-variables-are-known/" rel="noopener noreferrer" target="_blank">Conditional Probability When the Sum of Two Geometric Random Variables Are Known</a></p>
<button class="simplefavorite-button has-count" data-postid="7228" data-siteid="1" data-groupid="1" data-favoritecount="5" style="">Click here if solved <i class="sf-icon-star-empty"></i><span class="simplefavorite-button-count" style="">5</span></button><p>The post <a href="https://yutsumura.com/probability-that-alice-tossed-a-coin-three-times-if-alice-and-bob-tossed-totally-7-times/" target="_blank">Probability that Alice Tossed a Coin Three Times If Alice and Bob Tossed Totally 7 Times</a> first appeared on <a href="https://yutsumura.com/" target="_blank">Problems in Mathematics</a>.</p>]]></content:encoded>
							<wfw:commentRss>https://yutsumura.com/probability-that-alice-tossed-a-coin-three-times-if-alice-and-bob-tossed-totally-7-times/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">7228</post-id>	</item>
		<item>
		<title>Coupon Collecting Problem: Find the Expectation of Boxes to Collect All Toys</title>
		<link>https://yutsumura.com/coupon-collecting-problem-find-the-expectation-of-boxes-to-collect-all-toys/</link>
				<comments>https://yutsumura.com/coupon-collecting-problem-find-the-expectation-of-boxes-to-collect-all-toys/#respond</comments>
				<pubDate>Mon, 27 Jan 2020 21:25:48 +0000</pubDate>
		<dc:creator><![CDATA[Yu]]></dc:creator>
				<category><![CDATA[Probability]]></category>
		<category><![CDATA[coupon collecting problem]]></category>
		<category><![CDATA[expected value]]></category>
		<category><![CDATA[geometric distribution]]></category>
		<category><![CDATA[geometric random variable]]></category>
		<category><![CDATA[harmonic sum]]></category>
		<category><![CDATA[linearity of expectation]]></category>
		<category><![CDATA[probability]]></category>
		<category><![CDATA[standard deviation]]></category>
		<category><![CDATA[variance]]></category>

		<guid isPermaLink="false">https://yutsumura.com/?p=7222</guid>
				<description><![CDATA[<p>A box of some snacks includes one of five toys. The chances of getting any of the toys are equally likely and independent of the previous results. (a) Suppose that you buy the box&#46;&#46;&#46;</p>
<p>The post <a href="https://yutsumura.com/coupon-collecting-problem-find-the-expectation-of-boxes-to-collect-all-toys/" target="_blank">Coupon Collecting Problem: Find the Expectation of Boxes to Collect All Toys</a> first appeared on <a href="https://yutsumura.com/" target="_blank">Problems in Mathematics</a>.</p>]]></description>
								<content:encoded><![CDATA[<h2> Problem 750</h2>
<p>A box of some snacks includes one of five toys. The chances of getting any of the toys are equally likely and independent of the previous results.</p>
<p><strong>(a)</strong> Suppose that you buy the box until you complete all the five toys. Find the expected number of boxes that you need to buy.</p>
<p><strong>(b)</strong> Find the variance and the standard deviation of the event in part (a).</p>
<p><span id="more-7222"></span><br />

<h2>Solution.</h2>
<h3>Solution of (a)</h3>
<p>Let $X$ be the number of boxes that you need to buy until you complete all the five toys. Our goal is to compute the expected value $E[X]$.<br />
			To achieve this, we consider the next random variables. Let $X_i$ be the number of boxes you need to buy to get $i$th toy after getting $i-1$ toys. Then it is clear from definition that<br />
			\[X = X_1 + X_2 + X_3 + X_4 + X_5.\]
			For example, $X_1$ is the number of boxes you need to buy to get the first toy. Since whenever you open the first box, it is guaranteed that you get a new toy, we have $X_1 = 1$.<br />
			Also, to get the second toy after the first one, there are $4/5$ chance of getting new toy and $1/5$ chance of getting the same toy as the first one. Thus, $X_2$ is a geometric random variable with parameter $4/5$. We denote this as $X \sim G_{4/5}$. Similarly, we get<br />
			\[X_3 \sim G_{3/5}, \quad X_4 \sim G_{2/5}, \quad \text{ and } X_5 \sim G_{1/5}.\]
<p>			By the linearity of expectation, we have<br />
			\begin{align*}<br />
			E[X] &#038;= E[X_1 + X_2 + X_3 + X_4 + X_5]\\<br />
			&#038;= E[X_1] + E[X_2] + E[X_3] + E[X_4] + E[X_5]\\<br />
			&#038;= E[1] + E[G_{4/5}] + E[G_{3/5}] + E[G_{2/5}] + E[G_{1/5}]
			\end{align*}<br />
			Now, the expected value of a geometric random variable $G_p$ is given by<br />
			\[E[G_p] = \frac{1}{p}.\]
			It follows that<br />
			\begin{align*}<br />
				E[X] &#038;= 1 + \frac{5}{4} +\frac{5}{3} + \frac{5}{2} + \frac{5}{1}\\<br />
				&#038;= 5\left(1+ \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \frac{1}{5}\right)\\<br />
				&#038;\approx 11.41667<br />
			\end{align*}<br />
			Thus, the expected number of boxes that you need to buy to complete all the  five toys is 11.41667. </p>
<h3>Solution of (b)</h3>
<p>Now we compute the variance of $X$. Recall that the variance of a geometric random variable $G_p$ is given by<br />
			\[V(G_p) = \frac{1-p}{p^2}.\]
			As we have seen that<br />
			\begin{align*}<br />
			X &#038;= X_1 + X_2 + X_3 + X_4 + X_5\\<br />
			&#038;\sim 1 + G_{4/5} + G_{3/5} + G_{2/5} + G_{1/5}<br />
			\end{align*}<br />
			and as each random variable $X_i$ is independent of each other, we obtain<br />
			\begin{align*}<br />
			V(X) &#038;= V(1 + G_{4/5} + G_{3/5} + G_{2/5} + G_{1/5})\\[6pt]
			&#038;= V(1) + V(G_{4/5}) + V(G_{3/5}) + V(G_{2/5}) + V(G_{1/5})\\[6pt]
			&#038;= 0 + \frac{1-\frac{4}{5}}{\left(\frac{4}{5}\right)^2} + \frac{1-\frac{3}{5}}{\left(\frac{3}{5}\right)^2} + \frac{1-\frac{2}{5}}{\left(\frac{2}{5}\right)^2} + \frac{1-\frac{1}{5}}{\left(\frac{1}{5}\right)^2}\\[6pt]
			&#038;\approx 25.17361<br />
			\end{align*}<br />
			Thus, the variance is $V(X) = 25.17361$. </p>
<hr />
<p>			The standard deviation is the square root of the variance. Hence, we obtain<br />
			\[\sigma(X) \approx \sqrt{25.17361} \approx 5.01733.\]
<h2> Remark. </h2>
<p>This type of problems is called a <strong>Coupon Collecting Problem</strong>.</p>
<button class="simplefavorite-button has-count" data-postid="7222" data-siteid="1" data-groupid="1" data-favoritecount="2" style="">Click here if solved <i class="sf-icon-star-empty"></i><span class="simplefavorite-button-count" style="">2</span></button><p>The post <a href="https://yutsumura.com/coupon-collecting-problem-find-the-expectation-of-boxes-to-collect-all-toys/" target="_blank">Coupon Collecting Problem: Find the Expectation of Boxes to Collect All Toys</a> first appeared on <a href="https://yutsumura.com/" target="_blank">Problems in Mathematics</a>.</p>]]></content:encoded>
							<wfw:commentRss>https://yutsumura.com/coupon-collecting-problem-find-the-expectation-of-boxes-to-collect-all-toys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
						<post-id xmlns="com-wordpress:feed-additions:1">7222</post-id>	</item>
	</channel>
</rss>
