Files
2026-08-01 15:00:14 +00:00

656 lines
82 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<!--********************************************-->
<!--* Generated from PreTeXt source *-->
<!--* *-->
<!--* https://pretextbook.org *-->
<!--* *-->
<!--********************************************-->
<html lang="en-US" dir="ltr">
<!--******************************************-->
<!--* Authored with PreTeXt *-->
<!--* pretextbook.org *-->
<!--* Theme: boulder *-->
<!--* Palette: *-->
<!--******************************************-->
<head xmlns:og="http://ogp.me/ns#" xmlns:book="https://ogp.me/ns/book#">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Discrete Random Variables</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0">
<link href="_static/pretext/css/theme.css" rel="stylesheet" type="text/css">
<script type="module">import { startMathJax } from './_static/pretext/js/dist/mathjax_startup.js';
startMathJax({
hasWebworkReps: false,
hasSage: false,
isReact: false,
htmlPresentation: false,
});
</script><script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-mml-chtml.js"></script><meta name="Keywords" content="Authored in PreTeXt">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:type" content="book">
<meta name="twitter:title" content="Math 1044 Notes">
<meta property="og:title" content="Math 1044 Notes">
<meta property="book:title" content="Math 1044 Notes">
<meta name="twitter:card" content="summary">
<script src="_static/pretext/js/jquery.min.js"></script><script src="_static/pretext/js/dist/pretext-core.js?v=2.45"></script><!--** eBookCongig is necessary to configure interactive **-->
<!--** Runestone components to run locally in reader's browser **-->
<!--** No external communication: **-->
<!--** log level is 0, Runestone Services are disabled **-->
<script type="text/javascript">
eBookConfig = {};
eBookConfig.useRunestoneServices = false;
eBookConfig.host = 'http://127.0.0.1:8000';
eBookConfig.course = 'PTX_Course_Title_Here';
eBookConfig.basecourse = 'PTX_Base_Course';
eBookConfig.isLoggedIn = false;
eBookConfig.email = '';
eBookConfig.isInstructor = false;
eBookConfig.logLevel = 0;
eBookConfig.username = '';
eBookConfig.readings = null;
eBookConfig.activities = null;
eBookConfig.downloadsEnabled = false;
eBookConfig.allow_pairs = false;
eBookConfig.enableScratchAC = false;
eBookConfig.build_info = "";
eBookConfig.python3 = null;
eBookConfig.runestone_version = '8.2.0';
eBookConfig.jobehost = '';
eBookConfig.proxyuri_runs = '';
eBookConfig.proxyuri_files = '';
eBookConfig.enable_chatcodes = false;
</script>
<!--*** Runestone Services ***-->
<script src="_static/prefix-runtime.82b0f3334d1d4a05.bundle.js"></script><script src="_static/prefix-926.5c7038c8ef173faf.bundle.js"></script><script src="_static/prefix-runestone.5555907f139e2014.bundle.js"></script><link rel="stylesheet" type="text/css" href="_static/prefix-926.229729d09512acc9.css">
<link rel="stylesheet" type="text/css" href="_static/prefix-runestone.8086b62682b271d1.css">
<script src="_static/pretext/js/dist/lti_iframe_resizer.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.3.9/lunr.min.js" integrity="sha512-4xUl/d6D6THrAnXAwGajXkoWaeMNwEKK4iNfq5DotEbLPAfk6FSxSP3ydNxqDgCw1c/0Z1Jg6L8h2j+++9BZmg==" crossorigin="anonymous" referrerpolicy="no-referrer"></script><script src="lunr-pretext-search-index.js" async=""></script><script src="_static/pretext/js/dist/pretext_search.js"></script><!--knowl.js code controls Sage Cells within knowls--><script>sagecellEvalName='Evaluate (Sage)';
</script>
</head>
<body class="pretext book ignore-math">
<a class="assistive" href="#ptx-content">Skip to main content</a><header id="ptx-masthead" class="ptx-masthead" role="banner"><div class="ptx-banner"><div class="title-container">
<div class="heading ptx-banner-heading"><a href="my-great-book.html"><span class="title">Math 1044 Notes</span></a></div>
<p class="byline">Andy Eisenberg (testing)</p>
</div></div></header><nav id="ptx-navbar" class="ptx-navbar navbar"><div class="ptx-navbar-contents">
<button id="ptx-toc-toggle" type="button" aria-controls="ptx-sidebar" class="toc-toggle button" title="Contents"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5d2;</span><span class="name">Contents</span></button><div class="ptx-search-box">
<div class="ptx-search-widget"><button id="ptx-search-button" type="button" class="ptx-search-button button" title="Search Book"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe8b6;</span><span class="name">Search Book</span></button></div>
<dialog id="ptx-search-dialog" class="ptx-dialog ptx-search-dialog"><div class="ptx-search-dialog-controls">
<input aria-label="Search term" id="ptx-search-terms" class="ptx-search-terms" type="text" name="terms" placeholder="Search terms"><button aria-label="Close" id="ptx-search-close" class="ptx-search-close"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5cd;</span></button>
</div>
<div id="ptx-search-status" class="ptx-search-status" aria-live="polite" aria-atomic="true"></div>
<h2 class="heading ptx-search-results-heading">Search Results: </h2>
<div id="ptx-search-empty" class="ptx-search-empty"><span>No results.</span></div>
<ol id="ptx-search-results" class="ptx-search-results"></ol></dialog>
</div>
<span class="nav-other-controls"><button id="ptx-embed-button" class="ptx-embed-button button" title="Embed this page"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe86f;</span><span class="name">Embed</span></button><dialog class="ptx-dialog ptx-embed-popup" id="ptx-embed-popup"><div class="ptx-embed-popup-controls">
<p>Copy the code below to embed this page in your own website or LMS page.</p>
<button class="ptx-embed-close-button button" id="ptx-embed-close-button" title="Close"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5cd;</span></button>
</div>
<div class="ptx-embed-code-container">
<textarea class="ptx-embed-code-textbox" id="ptx-embed-code-textbox" readonly aria-label="Embed"><iframe src="https://example.com/embed" width="100%" height="1000"></iframe></textarea><button autofocus="autofocus" class="ptx-embed-copy-button button" id="ptx-embed-copy-button" title="Copy"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe14d;</span><span class="name">Copy</span></button>
</div></dialog><button id="ptx-readability-options-button" class="ptx-readability-options-button button" title="Readability settings"><span class="icon material-symbols-outlined" aria-hidden="true">&#xf6f1;</span><span class="name">Readability settings</span></button><dialog class="ptx-dialog ptx-readability-options-popup" id="ptx-readability-options-popup"><div class="ptx-readability-options-popup-controls">
<h2 class="heading">Readability settings</h2>
<button class="ptx-readability-options-close-button button" id="ptx-readability-options-close-button" title="Close"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5cd;</span></button>
</div>
<div class="ptx-readability-options-group">
<label class="ptx-readability-slider-label" for="ptx-readability-line-height"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe240;</span><span>Line height</span><output id="ptx-readability-line-height-value" for="ptx-readability-line-height">1.35</output></label><input type="range" id="ptx-readability-line-height" min="1.10" max="3" step="0.05" value="1.35">
</div>
<div class="ptx-readability-options-group">
<label class="ptx-readability-slider-label" for="ptx-readability-font-size"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe245;</span><span>Content font size</span><output id="ptx-readability-font-size-value" for="ptx-readability-font-size">100%</output></label><input type="range" id="ptx-readability-font-size" min="0.8" max="1.5" step="0.05" value="1">
</div>
<fieldset class="ptx-readability-options-group ptx-readability-options-group-theme">
<legend>Theme</legend>
<label for="ptx-readability-theme-system"><input type="radio" name="ptx-readability-theme" id="ptx-readability-theme-system" value="system"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe1ab;</span><span>System</span></label><label for="ptx-readability-theme-light"><input type="radio" name="ptx-readability-theme" id="ptx-readability-theme-light" value="light"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe518;</span><span>Light</span></label><label for="ptx-readability-theme-dark"><input type="radio" name="ptx-readability-theme" id="ptx-readability-theme-dark" value="dark"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe51c;</span><span>Dark</span></label>
</fieldset>
<fieldset class="ptx-readability-options-group">
<legend>Assistive technologies</legend>
<label for="ptx-readability-accessible-permalinks"><input type="checkbox" id="ptx-readability-accessible-permalinks"><span>🔗</span><span>Expose permalinks</span></label>
</fieldset>
<div class="ptx-readability-options-group"><button type="button" class="ptx-readability-reset-button button" id="ptx-readability-reset-button"><span class="icon material-symbols-outlined" aria-hidden="true">&#xf053;</span><span class="name">Reset All</span></button></div></dialog></span><span class="treebuttons"><a class="previous-button button" href="ch-Random-Variables-2.html" title="Previous"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5cb;</span><span class="name">Prev</span></a><a class="up-button button" href="ch-Random-Variables.html" title="Up"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5ce;</span><span class="name">Up</span></a><a class="next-button button" href="sec-Continuous-RVs.html" title="Next"><span class="name">Next</span><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5cc;</span></a></span>
</div></nav><div id="latex-macros" class="hidden-content process-math" style="display:none"><span class="process-math">\(\newcommand{\N}{\mathbb N}
\newcommand{\Z}{\mathbb Z}
\newcommand{\Q}{\mathbb Q}
\newcommand{\R}{\mathbb R}
\DeclareMathOperator{\Bin}{Bin}
\DeclareMathOperator{\Geom}{Geom}
\DeclareMathOperator{\Poiss}{Poiss}
\DeclareMathOperator{\Exp}{Exp}
\DeclareMathOperator{\Norm}{N}
\DeclareMathOperator{\E}{E}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
\renewcommand{\L}{\mathcal{L}}
\newcommand{\est}{\widehat}
\newcommand{\lt}{&lt;}
\newcommand{\gt}{&gt;}
\newcommand{\amp}{&amp;}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)</span></div>
<div class="ptx-page">
<div id="ptx-sidebar" role="complementary" class="ptx-sidebar"><nav id="ptx-toc" tabindex="-1" aria-label="Contents" class="ptx-toc depth2"><ul class="structural toc-item-list contains-active">
<li class="toc-item toc-frontmatter"><div class="toc-title-box"><a href="frontmatter.html" class="internal"><span class="title">Front Matter</span></a></div></li>
<li class="toc-item toc-chapter">
<div class="toc-title-box"><a href="ch-Introduction.html" class="internal"><span class="codenumber">0</span> <span class="title">Introduction</span></a></div>
<ul id="ptx-toc-group-ch-Introduction" class="structural toc-item-list"><li class="toc-item toc-section"><div class="toc-title-box"><a href="sec-Introduction.html" class="internal"><span class="codenumber">0.1</span> <span class="title">Introduction</span></a></div></li></ul>
</li>
<li class="toc-item toc-chapter">
<div class="toc-title-box"><a href="ch-Probability.html" class="internal"><span class="codenumber">1</span> <span class="title">Probability Theory</span></a></div>
<ul id="ptx-toc-group-ch-Probability" class="structural toc-item-list">
<li class="toc-item toc-introduction"><div class="toc-title-box"><a href="ch-Probability-2.html" class="internal"><span class="title">Introduction</span></a></div></li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Set-Theory.html" class="internal"><span class="codenumber">1.1</span> <span class="title">Set Theory</span></a></div>
<ul id="ptx-toc-group-sec-Set-Theory" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Set-Theory.html#exercises-Set-Theory" class="internal"><span class="codenumber">1.1</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Probability.html" class="internal"><span class="codenumber">1.2</span> <span class="title">Definition of Probability</span></a></div>
<ul id="ptx-toc-group-sec-Probability" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Probability.html#exercises-Probability" class="internal"><span class="codenumber">1.2</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Conditional-Probability.html" class="internal"><span class="codenumber">1.3</span> <span class="title">Conditional Probability</span></a></div>
<ul id="ptx-toc-group-sec-Conditional-Probability" class="structural toc-item-list">
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Conditional-Probability.html#subsec-conditional-probability" class="internal"><span class="codenumber">1.3.1</span> <span class="title">Conditional Probability</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Conditional-Probability.html#subsec-diagnostic-testing" class="internal"><span class="codenumber">1.3.2</span> <span class="title">Diagnostic Testing</span></a></div></li>
<li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Conditional-Probability.html#exercises-Conditional-Probability" class="internal"><span class="codenumber">1.3.3</span> <span class="title">Exercises</span></a></div></li>
</ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Independent-Events.html" class="internal"><span class="codenumber">1.4</span> <span class="title">Independent Events</span></a></div>
<ul id="ptx-toc-group-sec-Independent-Events" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Independent-Events.html#exercises-Independent-Events" class="internal"><span class="codenumber">1.4</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
</ul>
</li>
<li class="toc-item toc-chapter contains-active">
<div class="toc-title-box"><a href="ch-Random-Variables.html" class="internal"><span class="codenumber">2</span> <span class="title">Random Variables</span></a></div>
<ul class="structural toc-item-list contains-active" id="ptx-toc-group-ch-Random-Variables">
<li class="toc-item toc-introduction"><div class="toc-title-box"><a href="ch-Random-Variables-2.html" class="internal"><span class="title">Introduction</span></a></div></li>
<li class="toc-item toc-section contains-active">
<div class="toc-title-box"><a href="sec-Discrete-RVs.html" class="internal"><span class="codenumber">2.1</span> <span class="title">Discrete Random Variables</span></a></div>
<ul class="structural toc-item-list active" id="ptx-toc-group-sec-Discrete-RVs">
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Discrete-RVs.html#subsec-Discrete-RVs" class="internal"><span class="codenumber">2.1.1</span> <span class="title">Discrete Random Variables</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Discrete-RVs.html#subsec-binomial-distribution" class="internal"><span class="codenumber">2.1.2</span> <span class="title">The Binomial Distribution</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Discrete-RVs.html#subsec-geometric-distribution" class="internal"><span class="codenumber">2.1.3</span> <span class="title">Geometric Distribution</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Discrete-RVs.html#subsec-poisson-distribution" class="internal"><span class="codenumber">2.1.4</span> <span class="title">Poisson Distribution</span></a></div></li>
<li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Discrete-RVs.html#exercises-Discrete-RVs" class="internal"><span class="codenumber">2.1.5</span> <span class="title">Exercises</span></a></div></li>
</ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Continuous-RVs.html" class="internal"><span class="codenumber">2.2</span> <span class="title">Continuous Random Variables</span></a></div>
<ul id="ptx-toc-group-sec-Continuous-RVs" class="structural toc-item-list">
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Continuous-RVs.html#subsec-pdfs" class="internal"><span class="codenumber">2.2.1</span> <span class="title">Probability Density Functions</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Continuous-RVs.html#subsec-cdf" class="internal"><span class="codenumber">2.2.2</span> <span class="title">Cumulative Distribution Functions</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Continuous-RVs.html#subsec-exponential-distribution" class="internal"><span class="codenumber">2.2.3</span> <span class="title">The Exponential Distribution</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Continuous-RVs.html#subsec-normal-distribution" class="internal"><span class="codenumber">2.2.4</span> <span class="title">Normal Distribution</span></a></div></li>
<li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Continuous-RVs.html#exercises-Continuous-RVs" class="internal"><span class="codenumber">2.2.5</span> <span class="title">Exercises</span></a></div></li>
</ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Joint-Distributions.html" class="internal"><span class="codenumber">2.3</span> <span class="title">Joint Distributions</span></a></div>
<ul id="ptx-toc-group-sec-Joint-Distributions" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Joint-Distributions.html#exercises-Joint-Distributions" class="internal"><span class="codenumber">2.3</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
</ul>
</li>
<li class="toc-item toc-chapter">
<div class="toc-title-box"><a href="ch-Expected-Value.html" class="internal"><span class="codenumber">3</span> <span class="title">Expected Value and Variance</span></a></div>
<ul id="ptx-toc-group-ch-Expected-Value" class="structural toc-item-list">
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Expected-Value.html" class="internal"><span class="codenumber">3.1</span> <span class="title">Expected Value</span></a></div>
<ul id="ptx-toc-group-sec-Expected-Value" class="structural toc-item-list">
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Expected-Value.html#subsec-discrete-EV" class="internal"><span class="codenumber">3.1.1</span> <span class="title">Discrete Expected Value</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Expected-Value.html#subsec-continuous-EV" class="internal"><span class="codenumber">3.1.2</span> <span class="title">Continuous Expected Value</span></a></div></li>
<li class="toc-item toc-subsection"><div class="toc-title-box"><a href="sec-Expected-Value.html#subsec-linearity-EV" class="internal"><span class="codenumber">3.1.3</span> <span class="title">Linearity of Expected Value</span></a></div></li>
<li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Expected-Value.html#exercises-Expected-Value" class="internal"><span class="codenumber">3.1.4</span> <span class="title">Exercises</span></a></div></li>
</ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Variance.html" class="internal"><span class="codenumber">3.2</span> <span class="title">Variance</span></a></div>
<ul id="ptx-toc-group-sec-Variance" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Variance.html#exercises-Variance" class="internal"><span class="codenumber">3.2</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Covariance.html" class="internal"><span class="codenumber">3.3</span> <span class="title">Covariance</span></a></div>
<ul id="ptx-toc-group-sec-Covariance" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Covariance.html#exercises-Covariance" class="internal"><span class="codenumber">3.3</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
</ul>
</li>
<li class="toc-item toc-chapter">
<div class="toc-title-box"><a href="ch-Confidence-Intervals.html" class="internal"><span class="codenumber">4</span> <span class="title">Confidence Intervals</span></a></div>
<ul id="ptx-toc-group-ch-Confidence-Intervals" class="structural toc-item-list">
<li class="toc-item toc-introduction"><div class="toc-title-box"><a href="ch-Confidence-Intervals-2.html" class="internal"><span class="title">Introduction</span></a></div></li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Likelihood.html" class="internal"><span class="codenumber">4.1</span> <span class="title">Likelihood</span></a></div>
<ul id="ptx-toc-group-sec-Likelihood" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Likelihood.html#sec-Likelihood-20" class="internal"><span class="codenumber">4.1</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-CLT.html" class="internal"><span class="codenumber">4.2</span> <span class="title">Central Limit Theorem</span></a></div>
<ul id="ptx-toc-group-sec-CLT" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-CLT.html#exercises-CLT" class="internal"><span class="codenumber">4.2</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Confidence-Intervals.html" class="internal"><span class="codenumber">4.3</span> <span class="title">Confidence Intervals</span></a></div>
<ul id="ptx-toc-group-sec-Confidence-Intervals" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Confidence-Intervals.html#exercises-Confidence-Intervals" class="internal"><span class="codenumber">4.3</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
</ul>
</li>
<li class="toc-item toc-chapter">
<div class="toc-title-box"><a href="ch-Hypothesis-Testing.html" class="internal"><span class="codenumber">5</span> <span class="title">Hypothesis Testing</span></a></div>
<ul id="ptx-toc-group-ch-Hypothesis-Testing" class="structural toc-item-list">
<li class="toc-item toc-introduction"><div class="toc-title-box"><a href="ch-Hypothesis-Testing-2.html" class="internal"><span class="title">Introduction</span></a></div></li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-One-Sample-Tests.html" class="internal"><span class="codenumber">5.1</span> <span class="title">One Sample Tests</span></a></div>
<ul id="ptx-toc-group-sec-One-Sample-Tests" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-One-Sample-Tests.html#exercises-One-Sample-Tests" class="internal"><span class="codenumber">5.1</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Two-Sample-Tests.html" class="internal"><span class="codenumber">5.2</span> <span class="title">Two Sample Tests</span></a></div>
<ul id="ptx-toc-group-sec-Two-Sample-Tests" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Two-Sample-Tests.html#exercises-Two-Sample-Tests" class="internal"><span class="codenumber">5.2</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Power.html" class="internal"><span class="codenumber">5.3</span> <span class="title">Power of a Test</span></a></div>
<ul id="ptx-toc-group-sec-Power" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Power.html#exercises-Power" class="internal"><span class="codenumber">5.3</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Chi-Squared.html" class="internal"><span class="codenumber">5.4</span> <span class="title"><span class="process-math">\(\chi^2\)</span> Test</span></a></div>
<ul id="ptx-toc-group-sec-Chi-Squared" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Chi-Squared.html#exercises-Chi-Squared" class="internal"><span class="codenumber">5.4</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
</ul>
</li>
<li class="toc-item toc-chapter">
<div class="toc-title-box"><a href="ch-Linear-Regression.html" class="internal"><span class="codenumber">6</span> <span class="title">Linear Regression</span></a></div>
<ul id="ptx-toc-group-ch-Linear-Regression" class="structural toc-item-list">
<li class="toc-item toc-introduction"><div class="toc-title-box"><a href="ch-Linear-Regression-2.html" class="internal"><span class="title">Introduction</span></a></div></li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Correlation.html" class="internal"><span class="codenumber">6.1</span> <span class="title">Correlation</span></a></div>
<ul id="ptx-toc-group-sec-Correlation" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Correlation.html#exercises-Correlation" class="internal"><span class="codenumber">6.1</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
<li class="toc-item toc-section">
<div class="toc-title-box"><a href="sec-Linear-Regression.html" class="internal"><span class="codenumber">6.2</span> <span class="title">Linear Regression</span></a></div>
<ul id="ptx-toc-group-sec-Linear-Regression" class="structural toc-item-list"><li class="toc-item toc-exercises"><div class="toc-title-box"><a href="sec-Linear-Regression.html#exercises-Linear-Regression" class="internal"><span class="codenumber">6.2</span> <span class="title">Exercises</span></a></div></li></ul>
</li>
</ul>
</li>
<li class="toc-item toc-backmatter">
<div class="toc-title-box"><a href="backmatter.html" class="internal"><span class="title">Backmatter</span></a></div>
<ul id="ptx-toc-group-backmatter" class="structural toc-item-list">
<li class="toc-item toc-appendix">
<div class="toc-title-box"><a href="backmatter-2.html" class="internal"><span class="codenumber">A</span> <span class="title"><span class="process-math">\(\Phi(z)\)</span> Table</span></a></div>
<ul id="ptx-toc-group-backmatter-2" class="structural toc-item-list"><li class="toc-item toc-section"><div class="toc-title-box"><a href="app-Phi-table.html" class="internal"><span class="codenumber">A.1</span> <span class="title"><span class="process-math">\(\Phi(z)\)</span> Table of Values</span></a></div></li></ul>
</li>
<li class="toc-item toc-appendix">
<div class="toc-title-box"><a href="backmatter-3.html" class="internal"><span class="codenumber">B</span> <span class="title"><span class="process-math">\(\chi^2\)</span> Critical Values Table</span></a></div>
<ul id="ptx-toc-group-backmatter-3" class="structural toc-item-list"><li class="toc-item toc-section"><div class="toc-title-box"><a href="app-Chi-squared-table.html" class="internal"><span class="codenumber">B.1</span> <span class="title"><span class="process-math">\(\chi^2\)</span> Critical Values</span></a></div></li></ul>
</li>
<li class="toc-item toc-colophon"><div class="toc-title-box"><a href="backmatter-4.html" class="internal"><span class="title">Colophon</span></a></div></li>
</ul>
</li>
</ul></nav></div>
<main class="ptx-main"><div id="ptx-content" class="ptx-content">
<section class="section" id="sec-Discrete-RVs">
<h1 class="heading hide-type">
<span class="type">Section</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Discrete Random Variables</span>
</h1>
<section class="subsection" id="subsec-Discrete-RVs">
<h2 class="heading hide-type">
<span class="type">Subsection</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.1</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Discrete Random Variables</span>
</h2>
<article class="definition definition-like" id="def-RV"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.1</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-RV-1-1">Let <span class="process-math">\(\Omega\)</span> be a sample space. A <dfn class="terminology">random variable</dfn> is a function <span class="process-math">\(X \colon \Omega \to \R\)</span> which assigns a number to each outcome.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#def-RV-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Definition 2.1.1"><a tabindex="-1" href="#def-RV" title="Copy heading and permalink for Definition 2.1.1" aria-label="Copy heading and permalink for Definition 2.1.1">🔗</a></div>
</article>
<article class="example example-like" id="subsec-Discrete-RVs-3"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.2</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="subsec-Discrete-RVs-3-1-1">Suppose an experiment consists of flipping a fair coin 4 times. Let <span class="process-math">\(X\)</span> be the number of heads. The actual outcomes in the experiment are heads/tails sequences of length 4, such as <span class="process-math">\(HTHT\)</span> and <span class="process-math">\(HHHT\text{.}\)</span> The random variable <span class="process-math">\(X\)</span> assigns a numerical measurement to the outcomes, such as <span class="process-math">\(X(HTHT) = 2\)</span> and <span class="process-math">\(X(HHHT) = 3\text{.}\)</span><div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-Discrete-RVs-3-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="para" id="subsec-Discrete-RVs-3-1-2">For any real number value <span class="process-math">\(a\text{,}\)</span> we can consider the event consisting of outcomes such that <span class="process-math">\(X = a\text{.}\)</span> For example, the flip sequences <span class="process-math">\(HHHT, HHTH, HTHH\text{,}\)</span> and <span class="process-math">\(THHH\)</span> all have 3 heads, so <span class="process-math">\(\Pr(X = 3) = \frac{4}{16} = \frac{1}{4}\text{.}\)</span><div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-Discrete-RVs-3-1-2" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Example 2.1.2"><a tabindex="-1" href="#subsec-Discrete-RVs-3" title="Copy heading and permalink for Example 2.1.2" aria-label="Copy heading and permalink for Example 2.1.2">🔗</a></div>
</article>
<article class="example example-like" id="example-indicator-distribution"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.3</span><span class="period heading-divison-mark heading-divison-mark__period">.</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Indicator Random Variable.</span>
</h3>
<div class="para logical" id="example-indicator-distribution-2-1">
<div class="para">Let <span class="process-math">\(A\)</span> be an event in the sample space <span class="process-math">\(\Omega\text{.}\)</span> An <dfn class="terminology">indicator random variable</dfn> for <span class="process-math">\(A\)</span> is the random variable <span class="process-math">\(X\)</span> such that</div>
<div class="displaymath process-math" id="example-indicator-distribution-2-1-6">
\begin{align*}
X(\omega) = \begin{cases} 1 \amp \omega \in A \\ 0 \amp \omega \notin A \end{cases}
\end{align*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#example-indicator-distribution-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Example 2.1.3: Indicator Random Variable"><a tabindex="-1" href="#example-indicator-distribution" title="Copy heading and permalink for Example 2.1.3: Indicator Random Variable" aria-label="Copy heading and permalink for Example 2.1.3: Indicator Random Variable">🔗</a></div>
</article>
<div class="para" id="subsec-Discrete-RVs-5">Indicator random variables are also called <dfn class="terminology">Bernoulli random variables</dfn>, although well prefer the former term since it more clearly states the purpose of these random variables: to indicate whether or not a particular event has occurred. Well use the language "<span class="process-math">\(X\)</span> indicates <span class="process-math">\(A\)</span>" to mean that <span class="process-math">\(X\)</span> is an indicator random variable for the event <span class="process-math">\(A\text{.}\)</span> In this case, <span class="process-math">\(\Pr(X = 1) = \Pr(A)\text{,}\)</span> and <span class="process-math">\(\Pr(X = 0) = 1 - \Pr(A)\text{.}\)</span><div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-Discrete-RVs-5" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<article class="definition definition-like" id="def-discrete-and-continuous"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.4</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-discrete-and-continuous-1-1">Consider the set <span class="process-math">\(S\)</span> of all real numbers which are actually output by a random variable <span class="process-math">\(X\text{.}\)</span> If <span class="process-math">\(S\)</span> does not contain any interval of values, then the random variable <span class="process-math">\(X\)</span> is called <dfn class="terminology">discrete</dfn>. Otherwise, its called <dfn class="terminology">continuous</dfn>.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#def-discrete-and-continuous-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Definition 2.1.4"><a tabindex="-1" href="#def-discrete-and-continuous" title="Copy heading and permalink for Definition 2.1.4" aria-label="Copy heading and permalink for Definition 2.1.4">🔗</a></div>
</article>
<article class="example example-like" id="subsec-Discrete-RVs-7"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.5</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="subsec-Discrete-RVs-7-1-1">Any random variable <span class="process-math">\(X\)</span> defined on a finite sample space <span class="process-math">\(\Omega\)</span> is discrete—the set of outputs of <span class="process-math">\(X\)</span> cannot contain an interval if it only has finitely many values.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-Discrete-RVs-7-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="para" id="subsec-Discrete-RVs-7-1-2">Suppose an experiment consists of growing a plant in a new fertilizer, and a random variable <span class="process-math">\(Y\)</span> measures the height of the plant after a set growing period. Now <span class="process-math">\(Y\)</span> could conceivably take on an intervals worth of values (such as, e.g., any real number between 10 inches and 20 inches), so this random variable would be continuous.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-Discrete-RVs-7-1-2" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="para" id="subsec-Discrete-RVs-7-1-3">The distinction between discrete and continuous random variables is not simply the distinction of whether the sample space is finite or infinite. Consider the experiment in which we flip a coin repeatedly until we first see a coin come up heads. Let <span class="process-math">\(Z\)</span> be the number of times the coin is flipped. Then there are infinitely many possible values of <span class="process-math">\(Z\)</span> (1, 2, 3, and so on), but theres no interval of real numbers which are all possible outputs of <span class="process-math">\(Z\text{.}\)</span> The possible outputs of <span class="process-math">\(Z\)</span> are discrete (in the non-technical, English sense of the word: separated).<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-Discrete-RVs-7-1-3" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Example 2.1.5"><a tabindex="-1" href="#subsec-Discrete-RVs-7" title="Copy heading and permalink for Example 2.1.5" aria-label="Copy heading and permalink for Example 2.1.5">🔗</a></div>
</article>
<div class="para" id="subsec-Discrete-RVs-8">There are several particular types of distributions that appear repeatedly, since they model common behaviors. Indicator random variables, for example, will appear any time a random process generates a yes/no or success/failure type of answer to a question. Below are some other common distributions.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-Discrete-RVs-8" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Subsection 2.1.1: Discrete Random Variables"><a tabindex="-1" href="#subsec-Discrete-RVs" title="Copy heading and permalink for Subsection 2.1.1: Discrete Random Variables" aria-label="Copy heading and permalink for Subsection 2.1.1: Discrete Random Variables">🔗</a></div>
</section>
<section class="subsection" id="subsec-binomial-distribution">
<h2 class="heading hide-type">
<span class="type">Subsection</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.2</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">The Binomial Distribution</span>
</h2>
<article class="definition definition-like" id="def-binomial-distribution"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.6</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-binomial-distribution-1-1">Suppose an event occurs with probability <span class="process-math">\(p\text{.}\)</span> If we perform <span class="process-math">\(n\)</span> independent trials, let <span class="process-math">\(S\)</span> be the random variable which counts the number of trials in which the event occurred. Then <span class="process-math">\(S\)</span> has the <dfn class="terminology">binomial distribution</dfn> with parameters <span class="process-math">\(n\)</span> and <span class="process-math">\(p\text{.}\)</span> Well write <span class="process-math">\(S \sim \Bin(n, p)\)</span> to denote this. For each value <span class="process-math">\(0 \leq k \leq n\text{,}\)</span> well write <span class="process-math">\(b(k)\)</span> for <span class="process-math">\(\Pr(S = k)\text{.}\)</span> (If we want to keep track of the parameter values, we may write <span class="process-math">\(b(k; n, p)\text{.}\)</span>)<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#def-binomial-distribution-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Definition 2.1.6"><a tabindex="-1" href="#def-binomial-distribution" title="Copy heading and permalink for Definition 2.1.6" aria-label="Copy heading and permalink for Definition 2.1.6">🔗</a></div>
</article>
<article class="example example-like" id="subsec-binomial-distribution-3"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.7</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="subsec-binomial-distribution-3-1-1">Suppose we have a coin which comes up heads with probability <span class="process-math">\(p = 0.4\text{.}\)</span> If we flip the coin three times and let <span class="process-math">\(S\)</span> be the number of heads, then <span class="process-math">\(S\)</span> is binomially distributed with parameters <span class="process-math">\(n = 3\)</span> and <span class="process-math">\(p = 0.4\text{.}\)</span> Then <span class="process-math">\(S\)</span> has the distribution below.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-binomial-distribution-3-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<figure class="table table-like" id="table-binomial-example"><figcaption><span class="type">Table</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.8<span class="period heading-divison-mark heading-divison-mark__period">.</span></span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="process-math">\(\Bin(3, 0.4)\)</span><div class="autopermalink" aria-hidden="true" data-description="Table 2.1.8: \Bin(3, 0.4)"><a tabindex="-1" href="#table-binomial-example" title="Copy heading and permalink for Table 2.1.8: \Bin(3, 0.4)" aria-label="Copy heading and permalink for Table 2.1.8: \Bin(3, 0.4)">🔗</a></div></figcaption><div class="tabular-box natural-width"><table class="tabular">
<tr class="header-horizontal">
<th scope="col" class="c m b1 r0 l0 t0 lines"><span class="process-math">\(k\)</span></th>
<th scope="col" class="c m b1 r0 l0 t0 lines"><span class="process-math">\(\Pr(S = k)\)</span></th>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">0</td>
<td class="c m b0 r0 l0 t0 lines">0.216</td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">1</td>
<td class="c m b0 r0 l0 t0 lines">0.432</td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">2</td>
<td class="c m b0 r0 l0 t0 lines">0.288</td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">3</td>
<td class="c m b0 r0 l0 t0 lines">0.064</td>
</tr>
</table></div>
</figure><div class="autopermalink" aria-hidden="true" data-description="Example 2.1.7"><a tabindex="-1" href="#subsec-binomial-distribution-3" title="Copy heading and permalink for Example 2.1.7" aria-label="Copy heading and permalink for Example 2.1.7">🔗</a></div>
</article>
<div class="para logical" id="subsec-binomial-distribution-4">
<div class="para">To understand how these probabilities are calculated, consider a particular heads/tails sequence, such as <span class="process-math">\(HHHT\text{.}\)</span> If the probability of heads is 0.4, then the probability of tails is 0.6. Since the results of different coin flips are independent from each other, the probability of seeing precisely the sequence <span class="process-math">\(HHT\)</span> would be the product <span class="process-math">\((0.4)(0.4)(0.6) = 0.096\text{.}\)</span> The probability of seeing precisely <span class="process-math">\(HTH\)</span> would be <span class="process-math">\((0.4)(0.6)(0.4) = 0.096\text{,}\)</span> the same product of terms in a different order. So, if we knew exactly the number of flip sequences of length 3 with exactly 2 heads, we could calculate the probability of seeing 2 heads as:</div>
<div class="displaymath process-math" id="subsec-binomial-distribution-4-6">
\begin{gather*}
\Pr(S = 2) = (\text{number of sequences})(\text{probability of each sequence})
\end{gather*}
</div>
<div class="para">The probability for each sequence is straightforward to generalize: if there are <span class="process-math">\(n\)</span> flips and <span class="process-math">\(k\)</span> of them are heads, then <span class="process-math">\(n - k\)</span> of them are tails. So the product we should calculate will have <span class="process-math">\(k\)</span> copies of the parameter <span class="process-math">\(p\)</span> and <span class="process-math">\(n - k\)</span> copies of the complementary probability <span class="process-math">\(1 - p\text{:}\)</span>
</div>
<div class="displaymath process-math" id="subsec-binomial-distribution-4-14">
\begin{gather*}
\text{probability of each sequence } = p^k(1-p)^k
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-binomial-distribution-4" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<article class="definition definition-like" id="def-binomial-coefficient"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.9</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-binomial-coefficient-1-1">Well write the symbol <span class="process-math">\({n \choose k}\)</span> to mean the number of ways to choose <span class="process-math">\(k\)</span> things out of <span class="process-math">\(n\)</span> things. The number <span class="process-math">\({n \choose k}\)</span> is read "<span class="process-math">\(n\)</span> choose <span class="process-math">\(k\)</span>" and called a <dfn class="terminology">binomial coefficient</dfn>.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#def-binomial-coefficient-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Definition 2.1.9"><a tabindex="-1" href="#def-binomial-coefficient" title="Copy heading and permalink for Definition 2.1.9" aria-label="Copy heading and permalink for Definition 2.1.9">🔗</a></div>
</article>
<div class="para" id="subsec-binomial-distribution-6">The term "binomial coefficient" is used here because these numbers form coefficients of a polynomial in an important theorem about binomials called the <a class="external" href="https://en.wikipedia.org/wiki/Binomial_theorem" target="_blank">Binomial Theorem</a>. The binomial coefficients will precisely tell us the number of flip sequences of length <span class="process-math">\(n\)</span> with precisely <span class="process-math">\(k\)</span> heads (to build such a sequence, we must choose <span class="process-math">\(k\)</span> out of <span class="process-math">\(n\)</span> flips in the sequence to be heads; the rest must be tails). So, now we need a way to find the numbers <span class="process-math">\({n \choose k}\text{.}\)</span><div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-binomial-distribution-6" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<article class="definition definition-like" id="def-factorial"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.10</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para logical" id="def-factorial-1-1">
<div class="para">Let <span class="process-math">\(n\)</span> be a positive integer. Then the <dfn class="terminology">factorial</dfn> of <span class="process-math">\(n\text{,}\)</span> written <span class="process-math">\(n!\text{,}\)</span> is the product of the positive integers up to <span class="process-math">\(n\text{,}\)</span> i.e.:</div>
<div class="displaymath process-math" id="def-factorial-1-1-6">
\begin{gather*}
n! = 1 \times 2 \times 3 \times \dotsb \times (n-1) \times n.
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#def-factorial-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Definition 2.1.10"><a tabindex="-1" href="#def-factorial" title="Copy heading and permalink for Definition 2.1.10" aria-label="Copy heading and permalink for Definition 2.1.10">🔗</a></div>
</article>
<article class="fact theorem-like" id="fact-binomial-coefficient-formula"><h3 class="heading">
<span class="type">Fact</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.11</span><span class="period heading-divison-mark heading-divison-mark__period">.</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Binomial Coefficient Formula.</span>
</h3>
<div class="para logical" id="fact-binomial-coefficient-formula-2-1">
<div class="para">For any <span class="process-math">\(0 \leq k \leq n\text{,}\)</span>
</div>
<div class="displaymath process-math" id="fact-binomial-coefficient-formula-2-1-2">
\begin{gather*}
{n \choose k} = \frac{n!}{k!(n-k)!}
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#fact-binomial-coefficient-formula-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Fact 2.1.11: Binomial Coefficient Formula"><a tabindex="-1" href="#fact-binomial-coefficient-formula" title="Copy heading and permalink for Fact 2.1.11: Binomial Coefficient Formula" aria-label="Copy heading and permalink for Fact 2.1.11: Binomial Coefficient Formula">🔗</a></div>
</article>
<div class="para logical" id="subsec-binomial-distribution-9">
<div class="para">We wont provide a justification of this formula here, but well put it to use to calculate probabilities in the binomial distribution. For example, the number of flip sequences of length 3 with exactly 2 heads is:</div>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/xref/table-binomial-example.html" id="subsec-binomial-distribution-9-1">
\begin{gather*}
{3 \choose 2} = \frac{3!}{2!1!} = \frac{6}{2} = 3.
\end{gather*}
</div>
<div class="para">Since we previously said the probability of such a sequence is 0.096, we can now find the probability of seeing exactly 2 heads in 3 flips of the coin:</div>
<div class="displaymath process-math" data-contains-math-knowls="./knowl/xref/table-binomial-example.html" id="subsec-binomial-distribution-9-2">
\begin{align*}
\Pr(S = 2) \amp = (\text{number of sequences})(\text{probability of each sequence}) \\
\amp = (3)(0.096) \\
\amp = 0.288,
\end{align*}
</div>
<div class="para">which matches the value in <a href="sec-Discrete-RVs.html#table-binomial-example" class="xref" data-knowl="./knowl/xref/table-binomial-example.html" data-reveal-label="Reveal" data-close-label="Close" title="Table 2.1.8: \Bin(3, 0.4)">Table 2.1.8</a>. More generally:</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-binomial-distribution-9" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<article class="fact theorem-like" id="fact-binomial-probability-formula"><h3 class="heading">
<span class="type">Fact</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.12</span><span class="period heading-divison-mark heading-divison-mark__period">.</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Binomial Probability Formula.</span>
</h3>
<div class="para logical" id="fact-binomial-probability-formula-2-1">
<div class="displaymath process-math" id="fact-binomial-probability-formula-2-1-1">
\begin{gather*}
b(k; n, p) = {n \choose k} p^k (1-p)^{n-k}
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#fact-binomial-probability-formula-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Fact 2.1.12: Binomial Probability Formula"><a tabindex="-1" href="#fact-binomial-probability-formula" title="Copy heading and permalink for Fact 2.1.12: Binomial Probability Formula" aria-label="Copy heading and permalink for Fact 2.1.12: Binomial Probability Formula">🔗</a></div>
</article><div class="autopermalink" aria-hidden="true" data-description="Subsection 2.1.2: The Binomial Distribution"><a tabindex="-1" href="#subsec-binomial-distribution" title="Copy heading and permalink for Subsection 2.1.2: The Binomial Distribution" aria-label="Copy heading and permalink for Subsection 2.1.2: The Binomial Distribution">🔗</a></div>
</section>
<section class="subsection" id="subsec-geometric-distribution">
<h2 class="heading hide-type">
<span class="type">Subsection</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.3</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Geometric Distribution</span>
</h2>
<article class="definition definition-like" id="def-geometric-distribution"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.13</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-geometric-distribution-1-1">Suppose an event occurs with probability <span class="process-math">\(p\text{.}\)</span> If we perform independent trials repeatedly, let <span class="process-math">\(N\)</span> be the random variable which counts the number of trials performed until we see the event occur for the first time. (<span class="process-math">\(N\)</span> counts the final trial in which the event occurs.) Then <span class="process-math">\(N\)</span> has the <dfn class="terminology">geometric distribution</dfn> with parameter <span class="process-math">\(p\text{.}\)</span> Well write <span class="process-math">\(N \sim \Geom(p)\)</span> to denote this. For each value <span class="process-math">\(k \geq 1\text{,}\)</span> well write <span class="process-math">\(g(k)\)</span> for <span class="process-math">\(\Pr(N = k)\text{.}\)</span> (If we want to keep track of the parameter value, we may write <span class="process-math">\(g(k; p)\text{.}\)</span>)<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#def-geometric-distribution-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Definition 2.1.13"><a tabindex="-1" href="#def-geometric-distribution" title="Copy heading and permalink for Definition 2.1.13" aria-label="Copy heading and permalink for Definition 2.1.13">🔗</a></div>
</article>
<div class="para" id="subsec-geometric-distribution-3">Suppose we flip a coin repeatedly until we first see heads. The number <span class="process-math">\(N\)</span> of flips is geometrically distributed with parameter <span class="process-math">\(p\text{,}\)</span> which gives the probability of a flip coming up heads. Then the probability of tails is <span class="process-math">\(1 - p\text{.}\)</span> For any particular <span class="process-math">\(k \geq 1\text{,}\)</span> in order to have <span class="process-math">\(N = k\text{,}\)</span> we must see exactly the flip sequence <span class="process-math">\(TT\dotsm TH\text{,}\)</span> where the number of tails is exactly <span class="process-math">\(k - 1\text{.}\)</span> The probability of seeing this particular sequence is then:<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-geometric-distribution-3" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<article class="fact theorem-like" id="fact-geometric-probability-formula"><h3 class="heading">
<span class="type">Fact</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.14</span><span class="period heading-divison-mark heading-divison-mark__period">.</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Geometric Probability Formula.</span>
</h3>
<div class="para logical" id="fact-geometric-probability-formula-2-1">
<div class="displaymath process-math" id="fact-geometric-probability-formula-2-1-1">
\begin{gather*}
g(k; p) = (1-p)^{k-1} p
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#fact-geometric-probability-formula-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Fact 2.1.14: Geometric Probability Formula"><a tabindex="-1" href="#fact-geometric-probability-formula" title="Copy heading and permalink for Fact 2.1.14: Geometric Probability Formula" aria-label="Copy heading and permalink for Fact 2.1.14: Geometric Probability Formula">🔗</a></div>
</article><div class="autopermalink" aria-hidden="true" data-description="Subsection 2.1.3: Geometric Distribution"><a tabindex="-1" href="#subsec-geometric-distribution" title="Copy heading and permalink for Subsection 2.1.3: Geometric Distribution" aria-label="Copy heading and permalink for Subsection 2.1.3: Geometric Distribution">🔗</a></div>
</section>
<section class="subsection" id="subsec-poisson-distribution">
<h2 class="heading hide-type">
<span class="type">Subsection</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.4</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Poisson Distribution</span>
</h2>
<article class="definition definition-like" id="def-poisson-distribution"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.15</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-poisson-distribution-1-1">A <dfn class="terminology">Poisson process</dfn> is one in which some event occurs randomly at a constant probabilistic rate <span class="process-math">\(\lambda\)</span> over time. Suppose we observe a Poisson process for a fixed amount of time <span class="process-math">\(t\text{,}\)</span> and let <span class="process-math">\(N\)</span> count the number of occurrences of the event. Then <span class="process-math">\(N\)</span> has the <dfn class="terminology">Poisson distribution</dfn> with parameters <span class="process-math">\(\lambda\)</span> and <span class="process-math">\(t\text{.}\)</span> Well write <span class="process-math">\(N \sim \Poiss(\lambda, t)\)</span> to denote this. For each value <span class="process-math">\(k \geq 0\text{,}\)</span> well write <span class="process-math">\(p(k)\)</span> for <span class="process-math">\(\Pr(N = k)\text{.}\)</span> (If we want to keep track of the parameter values, we may write <span class="process-math">\(p(k; \lambda, t)\text{.}\)</span> See <a href="sec-Discrete-RVs.html#example-poisson-rate" class="xref" data-knowl="./knowl/xref/example-poisson-rate.html" data-reveal-label="Reveal" data-close-label="Close" title="Example 2.1.17">Example 2.1.17</a> for an important detail about units.)<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#def-poisson-distribution-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Definition 2.1.15"><a tabindex="-1" href="#def-poisson-distribution" title="Copy heading and permalink for Definition 2.1.15" aria-label="Copy heading and permalink for Definition 2.1.15">🔗</a></div>
</article>
<article class="fact theorem-like" id="fact-poisson-probability-formula"><h3 class="heading">
<span class="type">Fact</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.16</span><span class="period heading-divison-mark heading-divison-mark__period">.</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Poisson Probability Formula.</span>
</h3>
<div class="para logical" id="fact-poisson-probability-formula-2-1">
<div class="displaymath process-math" id="fact-poisson-probability-formula-2-1-1">
\begin{gather*}
p(k; \lambda, t) = \frac{(\lambda t)^k}{k!} e^{-\lambda t}.
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#fact-poisson-probability-formula-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Fact 2.1.16: Poisson Probability Formula"><a tabindex="-1" href="#fact-poisson-probability-formula" title="Copy heading and permalink for Fact 2.1.16: Poisson Probability Formula" aria-label="Copy heading and permalink for Fact 2.1.16: Poisson Probability Formula">🔗</a></div>
</article>
<div class="para" id="subsec-poisson-distribution-4">The term <span class="process-math">\(\lambda t\)</span> is potentially misleading here depending on the units given for each value. The idea is that the rate information might be given for a different period of time than the observation period, so the rate should be scaled before calculating a probability. But the rate and observation time must be using the same time unit before multiplying. See the following example.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#subsec-poisson-distribution-4" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<article class="example example-like" id="example-poisson-rate"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.17</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para logical" id="example-poisson-rate-1-1">
<div class="para">Suppose we observe traffic along a particular stretch of highway which typically has 200 cars pass per hour. Let <span class="process-math">\(N\)</span> be the number of cars seen in a 2-hour observation period. Since the parameter <span class="process-math">\(\lambda = 200\)</span> cars per hour is given for a 1-hour period, we should scale it to find the rate for a 2-hour period: <span class="process-math">\(\lambda t = (200)(2) = 400\)</span> cars per 2-hours. Then, for example:</div>
<div class="displaymath process-math" id="example-poisson-rate-1-1-4">
\begin{gather*}
\Pr(N = 375) = p(375; 200, 2) = \frac{400^{375}}{375!} e^{-400} \approx 0.01.
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#example-poisson-rate-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="para logical" id="example-poisson-rate-1-2">
<div class="para">Now consider the random variable <span class="process-math">\(M\)</span> counting the number of cars seen in a 30-minute observation period. We should not calculate <span class="process-math">\(\lambda t = (200)(30) = 6000\text{,}\)</span> since <span class="process-math">\(\lambda\)</span> measures time in hours and <span class="process-math">\(t\)</span> measures time in minutes. We should first convert <span class="process-math">\(t = 0.5\)</span> hours, then we can find our appropriately scaled rate information: <span class="process-math">\((200)(0.5) = 100\)</span> cars per half-hour. Then, for example:</div>
<div class="displaymath process-math" id="example-poisson-rate-1-2-7">
\begin{gather*}
\Pr(M = 110) = p(110; 200, 0.5) = \frac{100^{110}}{110!}e^{-100} \approx 0.02.
\end{gather*}
</div>
<div class="para">Note that when we write the notation <span class="process-math">\(p(k; \lambda, t)\text{,}\)</span> we assume that <span class="process-math">\(\lambda\)</span> and <span class="process-math">\(t\)</span> are expressed with the same time units already.</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#example-poisson-rate-1-2" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Example 2.1.17"><a tabindex="-1" href="#example-poisson-rate" title="Copy heading and permalink for Example 2.1.17" aria-label="Copy heading and permalink for Example 2.1.17">🔗</a></div>
</article><div class="autopermalink" aria-hidden="true" data-description="Subsection 2.1.4: Poisson Distribution"><a tabindex="-1" href="#subsec-poisson-distribution" title="Copy heading and permalink for Subsection 2.1.4: Poisson Distribution" aria-label="Copy heading and permalink for Subsection 2.1.4: Poisson Distribution">🔗</a></div>
</section>
<section class="exercises" id="exercises-Discrete-RVs">
<h2 class="heading hide-type">
<span class="type">Exercises</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">2.1.5</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Exercises</span>
</h2>
<article class="exercise exercise-like" id="exercises-Discrete-RVs-1"><h3 class="heading"><span class="codenumber">1<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h3>
<div class="para" id="exercises-Discrete-RVs-1-1-1">An experiment consists of flipping a biased coin 20 times. If the coin comes up heads with probability <span class="process-math">\(p = 0.3\text{,}\)</span> find the probability of seeing 5 heads. Find the probability of seeing up to (and including) 3 heads.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-1-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="solutions">
<details id="exercises-Discrete-RVs-1-2" class="solution solution-like born-hidden-knowl"><summary class="knowl__link"><span class="type">Solution</span><span class="period heading-divison-mark heading-divison-mark__period">.</span></summary>
<div class="solution solution-like knowl__content">
<div class="para logical" id="exercises-Discrete-RVs-1-2-1">
<div class="para">Let <span class="process-math">\(S\)</span> be the number of heads. Then <span class="process-math">\(S \sim \Bin(20, 0.3)\text{,}\)</span> so:</div>
<div class="displaymath process-math" id="exercises-Discrete-RVs-1-2-1-3">
\begin{align*}
\Pr(S = 5) \amp = {20 \choose 5} (0.3)^5 (0.7)^{20 - 5} \\
\amp = \frac{20!}{(5!)(15!)} (0.3)^5 (0.7)^{15} \\
\amp = \frac{20 \times 19 \times 18 \times 17 \times 16}{5 \times 4 \times 3 \times 2 \times 1} (0.3)^5 (0.7)^{15} \\
\amp = (19 \times 3 \times 17 \times 16) (0.3)^5 (0.7)^{15} \\
\amp \approx 0.179
\end{align*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-1-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Solution 2.1.5.1.1"><a tabindex="-1" href="#exercises-Discrete-RVs-1-2" title="Copy heading and permalink for Solution 2.1.5.1.1" aria-label="Copy heading and permalink for Solution 2.1.5.1.1">🔗</a></div>
</div></details>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Exercise 2.1.5.1"><a tabindex="-1" href="#exercises-Discrete-RVs-1" title="Copy heading and permalink for Exercise 2.1.5.1" aria-label="Copy heading and permalink for Exercise 2.1.5.1">🔗</a></div>
</article>
<article class="exercise exercise-like" id="exercises-Discrete-RVs-2"><h3 class="heading"><span class="codenumber">2<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h3>
<div class="introduction" id="exercises-Discrete-RVs-2-1">
<div class="para" id="exercises-Discrete-RVs-2-1-1">An experiment consists of flipping a coin repeatedly until we first see heads.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-2-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
</div>
<article class="task exercise-like" id="exercises-Discrete-RVs-2-2"><h4 class="heading"><span class="codenumber">(a)</span></h4>
<div class="para" id="exercises-Discrete-RVs-2-2-1-1">If the coin comes up heads with probability 0.4, what is the probability well see our first heads within three flips? What about precisely on the third flip?<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-2-2-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="solutions">
<details id="exercises-Discrete-RVs-2-2-2" class="solution solution-like born-hidden-knowl"><summary class="knowl__link"><span class="type">Solution</span><span class="period heading-divison-mark heading-divison-mark__period">.</span></summary>
<div class="solution solution-like knowl__content">
<div class="para logical" id="exercises-Discrete-RVs-2-2-2-1">
<div class="para">Let <span class="process-math">\(T\)</span> be the number of flips until we see heads. Then <span class="process-math">\(T\)</span> is geometric with parameter <span class="process-math">\(p = 0.4\text{,}\)</span> so:</div>
<div class="displaymath process-math" id="exercises-Discrete-RVs-2-2-2-1-4">
\begin{align*}
\Pr(T = k) \amp = (1-0.4)^{k-1}(0.4) = 0.6^{k-1} \cdot 0.4
\end{align*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-2-2-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Solution 2.1.5.2.a.1"><a tabindex="-1" href="#exercises-Discrete-RVs-2-2-2" title="Copy heading and permalink for Solution 2.1.5.2.a.1" aria-label="Copy heading and permalink for Solution 2.1.5.2.a.1">🔗</a></div>
</div></details>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Task 2.1.5.2.a"><a tabindex="-1" href="#exercises-Discrete-RVs-2-2" title="Copy heading and permalink for Task 2.1.5.2.a" aria-label="Copy heading and permalink for Task 2.1.5.2.a">🔗</a></div>
</article>
<article class="task exercise-like" id="exercises-Discrete-RVs-2-3"><h4 class="heading"><span class="codenumber">(b)</span></h4>
<div class="para" id="exercises-Discrete-RVs-2-3-1-1">Which flip has the highest chance of being the first flip to come up heads?<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-2-3-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="solutions">
<details id="exercises-Discrete-RVs-2-3-2" class="solution solution-like born-hidden-knowl"><summary class="knowl__link"><span class="type">Solution</span><span class="period heading-divison-mark heading-divison-mark__period">.</span></summary>
<div class="solution solution-like knowl__content">
<div class="para" id="exercises-Discrete-RVs-2-3-2-1">
<span class="process-math">\(\Pr(T = k) = 0.6^{k-1} \cdot 0.4\text{,}\)</span> so every additional flip multiplies the probability by 0.6. Therefore, the highest value for <span class="process-math">\(\Pr(T = k)\)</span> occurs when <span class="process-math">\(k = 1\text{,}\)</span> in which case <span class="process-math">\(\Pr(T = 1) = 0.4.\)</span><div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-2-3-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Solution 2.1.5.2.b.1"><a tabindex="-1" href="#exercises-Discrete-RVs-2-3-2" title="Copy heading and permalink for Solution 2.1.5.2.b.1" aria-label="Copy heading and permalink for Solution 2.1.5.2.b.1">🔗</a></div>
</div></details>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Task 2.1.5.2.b"><a tabindex="-1" href="#exercises-Discrete-RVs-2-3" title="Copy heading and permalink for Task 2.1.5.2.b" aria-label="Copy heading and permalink for Task 2.1.5.2.b">🔗</a></div>
</article><div class="autopermalink" aria-hidden="true" data-description="Exercise 2.1.5.2"><a tabindex="-1" href="#exercises-Discrete-RVs-2" title="Copy heading and permalink for Exercise 2.1.5.2" aria-label="Copy heading and permalink for Exercise 2.1.5.2">🔗</a></div>
</article>
<article class="exercise exercise-like" id="exercises-Discrete-RVs-3"><h3 class="heading"><span class="codenumber">3<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h3>
<div class="para" id="exercises-Discrete-RVs-3-1-1">A particular store has an average of 20 customers each hour. During a 4-hour afternoon shift, what is the probability of serving 80 customers.<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-3-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="solutions">
<details id="exercises-Discrete-RVs-3-2" class="solution solution-like born-hidden-knowl"><summary class="knowl__link"><span class="type">Solution</span><span class="period heading-divison-mark heading-divison-mark__period">.</span></summary>
<div class="solution solution-like knowl__content">
<div class="para logical" id="exercises-Discrete-RVs-3-2-1">
<div class="para">Let <span class="process-math">\(N\)</span> be the number of customers seen during the afternoon shift. Since the store averages 20 customers per hour, it will average 80 per 4-hours. So <span class="process-math">\(N \sim \Poiss(20, 4)\)</span> will have distribution <span class="process-math">\(\Pr(N = k) = \frac{80^{k}}{k!} e^{-80}\text{.}\)</span> Therefore:</div>
<div class="displaymath process-math" id="exercises-Discrete-RVs-3-2-1-4">
\begin{gather*}
\Pr(N = 80) = \frac{80^{80}}{80!} e^{-80} \approx 0.045.
\end{gather*}
</div>
<div class="autopermalink" aria-hidden="true" data-description="Paragraph"><a tabindex="-1" href="#exercises-Discrete-RVs-3-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Solution 2.1.5.3.1"><a tabindex="-1" href="#exercises-Discrete-RVs-3-2" title="Copy heading and permalink for Solution 2.1.5.3.1" aria-label="Copy heading and permalink for Solution 2.1.5.3.1">🔗</a></div>
</div></details>
</div>
<div class="autopermalink" aria-hidden="true" data-description="Exercise 2.1.5.3"><a tabindex="-1" href="#exercises-Discrete-RVs-3" title="Copy heading and permalink for Exercise 2.1.5.3" aria-label="Copy heading and permalink for Exercise 2.1.5.3">🔗</a></div>
</article><div class="autopermalink" aria-hidden="true" data-description="Exercises 2.1.5"><a tabindex="-1" href="#exercises-Discrete-RVs" title="Copy heading and permalink for Exercises 2.1.5" aria-label="Copy heading and permalink for Exercises 2.1.5">🔗</a></div>
</section><div class="autopermalink" aria-hidden="true" data-description="Section 2.1: Discrete Random Variables"><a tabindex="-1" href="#sec-Discrete-RVs" title="Copy heading and permalink for Section 2.1: Discrete Random Variables" aria-label="Copy heading and permalink for Section 2.1: Discrete Random Variables">🔗</a></div>
</section>
</div>
<div id="ptx-content-footer" class="ptx-content-footer">
<a class="previous-button button" href="ch-Random-Variables-2.html" title="Previous"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5cb;</span><span class="name">Prev</span></a><a class="top-button button" href="#" title="Top"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5ce;</span><span class="name">Top</span></a><a class="next-button button" href="sec-Continuous-RVs.html" title="Next"><span class="name">Next</span><span class="icon material-symbols-outlined" aria-hidden="true">&#xe5cc;</span></a>
</div></main>
</div>
<div id="ptx-page-footer" class="ptx-page-footer">
<a class="pretext-link" href="https://pretextbook.org" title="PreTeXt"><div class="logo"><svg xmlns="http://www.w3.org/2000/svg" height="100%" viewBox="338 3000 8772 6866" role="img"><title>PreTeXt logo</title><g style="stroke-width:.025in; stroke:currentColor; fill:none"><polyline points="472,3590 472,9732 " style="stroke-width:174; stroke-linejoin:miter; stroke-linecap:round; "></polyline><path style="stroke-width:126;stroke-linecap:butt;" d="M 4724,9448 A 4660 4660 0 0 1 8598 9259"></path><path style="stroke-width:174;stroke-linecap:butt;" d="M 4488,9685 A 4228 4228 0 0 0 472 9732"></path><path style="stroke-width:126;stroke-linecap:butt;" d="M 4724,3590 A 4241 4241 0 0 1 8598 3496"></path><path style="stroke-width:126;stroke-linecap:round;" d="M 850,3496 A 4241 4241 0 0 1 4724 3590"></path><path style="stroke-width:126;stroke-linecap:round;" d="M 850,9259 A 4507 4507 0 0 1 4724 9448"></path><polyline points="5385,4299 4062,8125" style="stroke-width:300; stroke-linejoin:miter; stroke-linecap:round;"></polyline><polyline points="8598,3496 8598,9259" style="stroke-width:126; stroke-linejoin:miter; stroke-linecap:round;"></polyline><polyline points="850,3496 850,9259" style="stroke-width:126; stroke-linejoin:miter; stroke-linecap:round;"></polyline><polyline points="4960,9685 4488,9685" style="stroke-width:174; stroke-linejoin:miter; stroke-linecap:round;"></polyline><polyline points="3070,4582 1889,6141 3070,7700" style="stroke-width:300; stroke-linejoin:miter; stroke-linecap:round;"></polyline><polyline points="6418,4582 7600,6141 6418,7700" style="stroke-width:300; stroke-linejoin:miter; stroke-linecap:round;"></polyline><polyline points="8976,3590 8976,9732" style="stroke-width:174; stroke-linejoin:miter; stroke-linecap:round;"></polyline><path style="stroke-width:174;stroke-linecap:butt;" d="M 4960,9685 A 4228 4228 0 0 1 8976 9732"></path></g></svg></div></a><a class="runestone-link" href="https://runestone.academy" title="Runestone Academy"><img class="logo" src="https://runestone.academy/runestone/static/images/RAIcon_cropped.png" alt="Runstone Academy logo"></a><a class="mathjax-link" href="https://www.mathjax.org" title="MathJax"><img class="logo" src="https://www.mathjax.org/badge/badge-square-2.png" alt="MathJax logo"></a>
</div>
</body>
</html>