<?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>linearity of expectation &#8211; Problems in Mathematics</title>
	<atom:link href="https://yutsumura.com/tag/linearity-of-expectation/feed/" rel="self" type="application/rss+xml" />
	<link>https://yutsumura.com</link>
	<description></description>
	<lastBuildDate>Mon, 27 Jan 2020 21:25:48 +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>linearity of expectation &#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>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="1" style="">Click here if solved <i class="sf-icon-star-empty"></i><span class="simplefavorite-button-count" style="">1</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>
