Files
Probability-and-Statistics-…/sec-Likelihood.html
T
2026-02-19 07:44:51 -05:00

565 lines
63 KiB
HTML
Executable File
Raw 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>Likelihood</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>
var runestoneMathReady = new Promise((resolve) => window.rsMathReady = resolve);
window.MathJax = {
"tex": {
"inlineMath": [
[
"\\(",
"\\)"
]
],
"tags": "none",
"tagSide": "right",
"tagIndent": ".8em",
"packages": {
"[+]": [
"base",
"extpfeil",
"ams",
"amscd",
"color",
"newcommand",
"knowl"
]
}
},
"options": {
"ignoreHtmlClass": "tex2jax_ignore|ignore-math",
"processHtmlClass": "process-math"
},
"chtml": {
"scale": 0.98,
"mtextInheritFont": true
},
"loader": {
"load": [
"input/asciimath",
"[tex]/extpfeil",
"[tex]/amscd",
"[tex]/color",
"[tex]/newcommand",
"[pretext]/mathjaxknowl3.js"
],
"paths": {
"pretext": "_static/pretext/js"
}
},
"startup": {
pageReady() {
return MathJax.startup.defaultPageReady().then(function () {
console.log("in ready function");
rsMathReady();
}
)}
}
};
</script><script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-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 property="book:title" content="Math 1044 Notes">
<meta property="book:author" content="Andy Eisenberg">
<script src="_static/pretext/js/jquery.min.js"></script><script src="_static/pretext/js/pretext.js"></script><script src="_static/pretext/js/pretext_add_on.js?x=1"></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 = '7.11.14';
eBookConfig.jobehost = '';
eBookConfig.proxyuri_runs = '';
eBookConfig.proxyuri_files = '';
eBookConfig.enable_chatcodes = false;
</script>
<!--*** Runestone Services ***-->
<script src="_static/prefix-runtime.d892923478694492.bundle.js"></script><script src="_static/prefix-723.3e6434f80549315a.bundle.js"></script><script src="_static/prefix-runestone.1d6e4aba17c2c7f2.bundle.js"></script><link rel="stylesheet" type="text/css" href="_static/prefix-723.3bccd435914aa0ff.css">
<link rel="stylesheet" type="text/css" href="_static/prefix-runestone.6ec5960970d8b364.css">
<script src="_static/pretext/js/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/pretext_search.js"></script><script src="_static/pretext/js/knowl.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"><div class="ptx-banner"><div class="title-container">
<h1 class="heading"><a href="my-great-book.html"><span class="title">Math 1044 Notes</span></a></h1>
<p class="byline">Andy Eisenberg</p>
</div></div></header><nav id="ptx-navbar" class="ptx-navbar navbar"><div class="ptx-navbar-contents">
<button 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="searchbox">
<div class="searchwidget"><button id="searchbutton" class="searchbutton button" type="button" title="Search book"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe8b6;</span><span class="name">Search Book</span></button></div>
<div id="searchresultsplaceholder" class="searchresultsplaceholder" style="display: none">
<div class="search-results-controls">
<input aria-label="Search term" id="ptxsearch" class="ptxsearch" type="text" name="terms" placeholder="Search term"><button title="Close search" id="closesearchresults" class="closesearchresults"><span class="material-symbols-outlined">close</span></button>
</div>
<h2 class="search-results-heading">Search Results: </h2>
<div id="searchempty" class="searchempty"><span>No results.</span></div>
<ol id="searchresults" class="searchresults"></ol>
</div>
</div>
<span class="nav-other-controls"><button id="embed-button" class="embed-button button" title="Embed this page"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe86f;</span><span class="name">Embed</span></button><div class="embed-popup hidden" id="embed-popup">
<p>Copy the code below to embed this page in your own website or LMS page.</p>
<div class="embed-code-container">
<textarea class="embed-code-textbox" id="embed-code-textbox" readonly aria-label="textbox"><iframe src="https://example.com/embed" width="100%" height="1000"></iframe></textarea><button class="copy-embed-button button" id="copy-embed-button" title="Copy embed code"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe14d;</span><span class="name">Copy</span></button>
</div>
</div>
<button id="light-dark-button" class="light-dark-button button" title="Dark Mode"><span class="icon material-symbols-outlined" aria-hidden="true">&#xe51c;</span><span class="name">Dark Mode</span></button></span><span class="treebuttons"><a class="previous-button button" href="ch-Confidence-Intervals.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-Confidence-Intervals.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-CLT.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}
\newcommand{\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" class="ptx-sidebar"><nav id="ptx-toc" 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 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 class="structural toc-item-list">
<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 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 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 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 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">
<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">
<li class="toc-item toc-section">
<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">
<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 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 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 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 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 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 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 contains-active">
<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 class="structural toc-item-list contains-active">
<li class="toc-item toc-section contains-active">
<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 class="structural toc-item-list active"><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 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 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 class="structural toc-item-list">
<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 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 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 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 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 class="structural toc-item-list">
<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 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 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 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 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-colophon"><div class="toc-title-box"><a href="backmatter-3.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-Likelihood"><h2 class="heading hide-type">
<span class="type">Section</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Likelihood</span>
</h2>
<div class="para" id="sec-Likelihood-2">So far, weve been concerned with probability theory. Starting with a probability distribution and some parameter values, weve tried to answer questions like: Whats the probability of seeing certain experimental results? Statistics is concerned with going in the other direction: Upon seeing the experimental results, can we determine the type of underlying probability distribution? Can we determine its parameters?<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-2" 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-estimator"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.1</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-estimator-1-1">An <dfn class="terminology">estimator</dfn> is a value of a parameter computed from a sample of data.<div class="autopermalink" data-description="Paragraph"><a href="#def-estimator-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Definition 4.1.1"><a href="#def-estimator" title="Copy heading and permalink for Definition 4.1.1" aria-label="Copy heading and permalink for Definition 4.1.1">🔗</a></div></article><article class="example example-like" id="sec-Likelihood-4"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.2</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="sec-Likelihood-4-1">Suppose we find a coin on the street and dont know whether or not its fair. We want to know the probability <span class="process-math">\(p\)</span> of the coin coming up heads. We might, for example, flip the coin <span class="process-math">\(n\)</span> times and count the number <span class="process-math">\(k\)</span> of heads. Then, well estimate <span class="process-math">\(p = \frac{k}{n}\text{.}\)</span> Well refer to this as a <dfn class="terminology">common sense</dfn> estimator. (Other distributions and parameter types will have different notions of "common sense".)<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-4-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Example 4.1.2"><a href="#sec-Likelihood-4" title="Copy heading and permalink for Example 4.1.2" aria-label="Copy heading and permalink for Example 4.1.2">🔗</a></div></article><div class="para" id="sec-Likelihood-5">An estimator is, itself, a random variable: it produces a numerical value based on the results of an experiment. Well use notation like <span class="process-math">\(\est{p}\)</span> for a random variable which is an estimator for a parameter <span class="process-math">\(p\text{.}\)</span> (Similarly, <span class="process-math">\(\est{\lambda}\)</span> would denote an estimator for a parameter called <span class="process-math">\(\lambda\text{.}\)</span>)<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-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-unbiased"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.3</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para" id="def-unbiased-1-1">An estimator <span class="process-math">\(\est{p}\)</span> is called <dfn class="terminology">unbiased</dfn> if <span class="process-math">\(\E(\est{p}) = p\text{.}\)</span><div class="autopermalink" data-description="Paragraph"><a href="#def-unbiased-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Definition 4.1.3"><a href="#def-unbiased" title="Copy heading and permalink for Definition 4.1.3" aria-label="Copy heading and permalink for Definition 4.1.3">🔗</a></div></article><article class="example example-like" id="sec-Likelihood-7"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.4</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para logical" id="sec-Likelihood-7-1-1">
<div class="para">Suppose we have a coin with parameter <span class="process-math">\(p\text{,}\)</span> which well flip <span class="process-math">\(n\)</span> times and count the number <span class="process-math">\(k\)</span> of heads. We use the unbiased estimator <span class="process-math">\(\est{p} = \frac{k}{n}\text{.}\)</span> In this case, notice that <span class="process-math">\(k \sim \Bin(n, p)\text{,}\)</span> so we know <span class="process-math">\(\E(k) = np\text{,}\)</span> although we dont know the value of <span class="process-math">\(p\text{.}\)</span> (We probably do know the value of <span class="process-math">\(n\text{;}\)</span> after all, were flipping the coin!) Now:</div>
<div class="displaymath process-math" id="sec-Likelihood-7-1-1-9">
\begin{gather*}
\E(\est{p}) = \E\left(\frac{k}{n}\right) = \frac{1}{n} \cdot \E(k) = \frac{1}{n} \cdot np = p.
\end{gather*}
</div>
<div class="para">Its worth pausing for a moment to be appropriately impressed with ourselves. We still dont know the true value of <span class="process-math">\(p\text{.}\)</span> But we managed to show that our common sense method of estimating <span class="process-math">\(p\)</span> gives, on average, the correct value.</div>
<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-7-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Example 4.1.4"><a href="#sec-Likelihood-7" title="Copy heading and permalink for Example 4.1.4" aria-label="Copy heading and permalink for Example 4.1.4">🔗</a></div></article><div class="para" id="sec-Likelihood-8">Wed like to be able to collect some data and use that data to estimate the values of whatever parameters our distribution has. Perhaps as a starting point, it would be good to identify the single most likely value of a parameter:<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-8" 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-likelihood"><h3 class="heading">
<span class="type">Definition</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.5</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para logical" id="def-likelihood-1-1">
<div class="para">Suppose we collect some data to estimate a parameter <span class="process-math">\(p\text{.}\)</span> The <dfn class="terminology">likelihood function</dfn> is:</div>
<div class="displaymath process-math" id="def-likelihood-1-1-3">
\begin{gather*}
\L(p) = \Pr(\text{data} \mid \text{parameter value is } p).
\end{gather*}
</div>
<div class="para">The value of <span class="process-math">\(p\)</span> which maximizes the function <span class="process-math">\(\L(p)\)</span> is called the <dfn class="terminology">maximum likelihood estimation</dfn>, or <dfn class="terminology">MLE</dfn>, of <span class="process-math">\(p\text{.}\)</span>
</div>
<div class="autopermalink" data-description="Paragraph"><a href="#def-likelihood-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Definition 4.1.5"><a href="#def-likelihood" title="Copy heading and permalink for Definition 4.1.5" aria-label="Copy heading and permalink for Definition 4.1.5">🔗</a></div></article><article class="example example-like" id="sec-Likelihood-10"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.6</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para logical" id="sec-Likelihood-10-1-1">
<div class="para">Suppose we flip a coin 100 times. Let <span class="process-math">\(N\)</span> be the number of heads. Then <span class="process-math">\(N\sim \Bin(100, p)\)</span> for some unknown value of <span class="process-math">\(p\text{:}\)</span>
</div>
<div class="displaymath process-math" id="sec-Likelihood-10-1-1-4">
\begin{align*}
\Pr(N = k) \amp = b(k; 100, p) = {100 \choose k} p^k (1 - p)^{100 - k}
\end{align*}
</div>
<div class="para">In this case, <span class="process-math">\(k\)</span> is the data that we collect, and <span class="process-math">\(p\)</span> is the value of the parameter. Suppose we see <span class="process-math">\(52\)</span> heads. Then:</div>
<div class="displaymath process-math" id="sec-Likelihood-10-1-1-8">
\begin{gather*}
\L(p) = {100 \choose 52} p^{52} (1 - p)^{48}.
\end{gather*}
</div>
<div class="para">If we want to know the most likely value of the parameter <span class="process-math">\(p\text{,}\)</span> then we should maximize <span class="process-math">\(\L(p)\)</span> over the interval <span class="process-math">\(0 \leq p \leq 1\text{.}\)</span>
</div>
<div class="displaymath process-math" id="sec-Likelihood-10-1-1-12">
\begin{align*}
\L'(p) \amp = {100 \choose 52} \left[ 52 p^{51}(1 - p)^{48} + p^{52} 48 (1 - p)^{47}(-1)\right] \\
\amp = {100 \choose 52} p^{51} (1 - p)^{47} \left[ 52 (1 - p) - 48p \right] \\
\amp = {100 \choose 52} p^{51} (1 - p)^{47} \left[ 52 - 100 p \right].
\end{align*}
</div>
<div class="para">We can see that <span class="process-math">\(\L'(p) = 0\)</span> when <span class="process-math">\(p = 0, 1, \frac{52}{100}\text{,}\)</span> and the endpoints of the interval were maximizing over are <span class="process-math">\(p = 0, 1\text{,}\)</span> so we can build a table:</div>
<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-10-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="sec-Likelihood-10-1-2"><figcaption><span class="type">Table</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.7<span class="period heading-divison-mark heading-divison-mark__period">.</span></span><span class="space heading-divison-mark heading-divison-mark__space"> </span>Looking for the Maximum<div class="autopermalink" data-description="Table 4.1.7: Looking for the Maximum"><a href="#sec-Likelihood-10-1-2" title="Copy heading and permalink for Table 4.1.7: Looking for the Maximum" aria-label="Copy heading and permalink for Table 4.1.7: Looking for the Maximum">🔗</a></div></figcaption><div class="tabular-box natural-width"><table class="tabular">
<tr>
<td class="c m b1 r0 l0 t0 lines"><span class="process-math">\(p\)</span></td>
<td class="c m b1 r0 l0 t0 lines"><span class="process-math">\(\L(p)\)</span></td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0\)</span></td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(52/100\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(\gt 0\)</span></td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(1\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0\)</span></td>
</tr>
</table></div></figure> <div class="para" id="sec-Likelihood-10-1-3">Note that we dont need to know the exact value of <span class="process-math">\(\L(52/100)\)</span> in order to see that its strictly positive, and therefore the maximum value of <span class="process-math">\(\L(p)\text{.}\)</span> So, the MLE of <span class="process-math">\(p\)</span> is <span class="process-math">\(52/100\text{.}\)</span><div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-10-1-3" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Example 4.1.6"><a href="#sec-Likelihood-10" title="Copy heading and permalink for Example 4.1.6" aria-label="Copy heading and permalink for Example 4.1.6">🔗</a></div></article><div class="para" id="sec-Likelihood-11">We can see in the previous example that the MLE of <span class="process-math">\(p\)</span> is also the common sense estimation of <span class="process-math">\(p\text{.}\)</span> This will be the case in general for the binomial distribution, so we wont need to redo this work over and over:<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-11" 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-MLE-binomial"><h3 class="heading">
<span class="type">Fact</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.8</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 MLE.</span>
</h3>
<div class="para" id="fact-MLE-binomial-2-1">If we see <span class="process-math">\(k\)</span> heads in <span class="process-math">\(n\)</span> coin flips, then the MLE of the bias <span class="process-math">\(p\)</span> is <span class="process-math">\(\frac{k}{n}\text{.}\)</span><div class="autopermalink" data-description="Paragraph"><a href="#fact-MLE-binomial-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Fact 4.1.8: Binomial MLE"><a href="#fact-MLE-binomial" title="Copy heading and permalink for Fact 4.1.8: Binomial MLE" aria-label="Copy heading and permalink for Fact 4.1.8: Binomial MLE">🔗</a></div></article><div class="para" id="sec-Likelihood-13">As we remember from Calculus 1, maximizing a continuous function works slightly differently over a closed interval (like the previous example) or an open interval (like the next example).<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-13" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<article class="example example-like" id="sec-Likelihood-14"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.9</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para logical" id="sec-Likelihood-14-1-1">
<div class="para">Suppose a radioactive material emits particles as it decays. Let <span class="process-math">\(N\)</span> count the particles emitted. Then <span class="process-math">\(N \sim \Poiss(\lambda)\)</span> for some unknown rate parameter <span class="process-math">\(\lambda\text{:}\)</span>
</div>
<div class="displaymath process-math" id="sec-Likelihood-14-1-1-4">
\begin{gather*}
\Pr(N = k) = p(k; \lambda) = \frac{\lambda^k}{k!} e^{-\lambda}
\end{gather*}
</div>
<div class="para">Suppose we observe a sample of material for 1 hour and count 8 particles emitted. Then:</div>
<div class="displaymath process-math" id="sec-Likelihood-14-1-1-5">
\begin{gather*}
\L(\lambda) = \frac{\lambda^8}{8!} e^{-\lambda}
\end{gather*}
</div>
<div class="para">To maximize <span class="process-math">\(\L(\lambda)\)</span> over the interval <span class="process-math">\(0 \lt \lambda \lt \infty\text{,}\)</span> we start by finding critical points.</div>
<div class="displaymath process-math" id="sec-Likelihood-14-1-1-8">
\begin{align*}
\L'(\lambda) \amp = \frac{1}{8!} \left[ 8 \lambda^7 e^{-\lambda} + \lambda^8 e^{-\lambda} (-1)\right] \\
\amp = \frac{1}{8!} \lambda^7 e^{-\lambda} \left[ 8 - e^{-\lambda} \right]
\end{align*}
</div>
<div class="para">The only critical point is <span class="process-math">\(\lambda = 8\text{,}\)</span> but we have not justified that this is the location of a global maximum. A critical point is only a potential location of a local minimum or maximum. But with a bit more justification: observe that <span class="process-math">\(\L'\)</span> is positive on the interval <span class="process-math">\((0, 8)\)</span> and negative on the interval <span class="process-math">\((8, \infty)\text{.}\)</span> Therefore the function <span class="process-math">\(\L\)</span> increases on <span class="process-math">\((0, 8)\)</span> and decreases on <span class="process-math">\((8, \infty)\text{.}\)</span> So it must reach its maximum at <span class="process-math">\(\lambda = 8\text{,}\)</span> which is therefore the MLE.</div>
<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-14-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Example 4.1.9"><a href="#sec-Likelihood-14" title="Copy heading and permalink for Example 4.1.9" aria-label="Copy heading and permalink for Example 4.1.9">🔗</a></div></article><div class="para" id="sec-Likelihood-15">As with the binomial distribution, the calculation will be essentially the same regardless of the specific number of particles observed, so:<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-15" 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-MLE-Poisson"><h3 class="heading">
<span class="type">Fact</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.10</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 MLE.</span>
</h3>
<div class="para" id="fact-MLE-Poisson-2-1">If we observe a Poisson process and see <span class="process-math">\(k\)</span> events occur, then the MLE of the rate parameter <span class="process-math">\(\lambda\)</span> is <span class="process-math">\(k\text{.}\)</span><div class="autopermalink" data-description="Paragraph"><a href="#fact-MLE-Poisson-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Fact 4.1.10: Poisson MLE"><a href="#fact-MLE-Poisson" title="Copy heading and permalink for Fact 4.1.10: Poisson MLE" aria-label="Copy heading and permalink for Fact 4.1.10: Poisson MLE">🔗</a></div></article><div class="para" id="sec-Likelihood-17">The situation for continuous random variables is similar, but slightly different. To build the likelihood function, we should use the pdf of the continuous random variable. So the likelihood function will give the probabiliy density given the data collected, rather than the probability itself.<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-17" 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-exponential-MLE"><h3 class="heading">
<span class="type">Example</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.11</span><span class="period heading-divison-mark heading-divison-mark__period">.</span>
</h3>
<div class="para logical" id="example-exponential-MLE-1-1">
<div class="para">Suppose we observe a cell and measure the time <span class="process-math">\(T\)</span> until a toxin molecule leaves the cell. Then <span class="process-math">\(T \sim \Exp(\lambda)\)</span> for some unknown rate parameter <span class="process-math">\(\lambda\text{:}\)</span>
</div>
<div class="displaymath process-math" id="example-exponential-MLE-1-1-4">
\begin{gather*}
f(t) = \lambda e^{-\lambda t}.
\end{gather*}
</div>
<div class="para">Suppose we observe a molecule leave the cell at <span class="process-math">\(t = 0.3\)</span> minutes. Then:</div>
<div class="displaymath process-math" id="example-exponential-MLE-1-1-6">
\begin{align*}
L(\lambda) \amp = \lambda e^{-0.3\lambda} \\
L'(\lambda) \amp = e^{-0.3\lambda} + \lambda e^{-0.3t} (-0.3) \\
\amp = e^{-0.3\lambda}\left[ 1 - 0.3\lambda\right]
\end{align*}
</div>
<div class="para">The critical point is <span class="process-math">\(\lambda = \frac{1}{0.3} \approx 3.33\text{.}\)</span> Since <span class="process-math">\(\L' \gt 0\)</span> on <span class="process-math">\((0, 3.33)\)</span> and <span class="process-math">\(\L' \lt 0\)</span> on <span class="process-math">\((3.33, \infty)\text{,}\)</span> there is a global maximum at <span class="process-math">\(\lambda \approx 3.33\text{,}\)</span> which is therefore the MLE.</div>
<div class="autopermalink" data-description="Paragraph"><a href="#example-exponential-MLE-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div> <div class="para" id="example-exponential-MLE-1-2">The specific time <span class="process-math">\(0.3\)</span> minutes doesnt particularly matter in this calculation. Whatever the time <span class="process-math">\(t\text{,}\)</span> essentially the same calculation will result in a MLE of <span class="process-math">\(\lambda = 1/t\text{.}\)</span> But what if we collect multiple pieces of data?<div class="autopermalink" data-description="Paragraph"><a href="#example-exponential-MLE-1-2" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div> <figure class="table table-like" id="example-exponential-MLE-1-3"><figcaption><span class="type">Table</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.12<span class="period heading-divison-mark heading-divison-mark__period">.</span></span><span class="space heading-divison-mark heading-divison-mark__space"> </span>Time Data<div class="autopermalink" data-description="Table 4.1.12: Time Data"><a href="#example-exponential-MLE-1-3" title="Copy heading and permalink for Table 4.1.12: Time Data" aria-label="Copy heading and permalink for Table 4.1.12: Time Data">🔗</a></div></figcaption><div class="tabular-box natural-width"><table class="tabular">
<tr>
<td class="c m b1 r0 l0 t0 lines">Molecule</td>
<td class="c m b1 r0 l0 t0 lines">Waiting Time</td>
<td class="c m b1 r0 l0 t0 lines">Rate Estimation</td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">1</td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0.3\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(3.33\)</span></td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">2</td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0.8\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(1.25\)</span></td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">3</td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0.5\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(2.00\)</span></td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">4</td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0.6\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(1.67\)</span></td>
</tr>
<tr>
<td class="c m b0 r0 l0 t0 lines">5</td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(0.9\)</span></td>
<td class="c m b0 r0 l0 t0 lines"><span class="process-math">\(1.11\)</span></td>
</tr>
</table></div></figure> <div class="para" id="example-exponential-MLE-1-4">How should take all of this data into account in our maximum likelihood estimation? We might consider taking the average of all of the separate rate estimations, which would give <span class="process-math">\(1.87\text{.}\)</span> Is this the most likely? We need some mathematical justification.<div class="autopermalink" data-description="Paragraph"><a href="#example-exponential-MLE-1-4" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div> <div class="para logical" id="example-exponential-MLE-1-5">
<div class="para">To account for multiple, independent data points, we should multiply the probability densities for each in the creation of our likelihood function:</div>
<div class="displaymath process-math" id="example-exponential-MLE-1-5-1">
\begin{align*}
\L(\lambda) \amp = \left(\lambda e^{-0.3\lambda}\right)\left(\lambda e^{-0.8\lambda}\right)\left(\lambda e^{-0.5\lambda}\right)\left(\lambda e^{-0.6\lambda}\right)\left(\lambda e^{-0.9\lambda}\right) \\
\amp = \lambda^5 e^{-0.3\lambda - 0.8\lambda - 0.5\lambda - 0.6\lambda - 0.9\lambda } \\
\amp = \lambda^5 e^{-3.1\lambda}
\end{align*}
</div>
<div class="para">Now we can find the maximum:</div>
<div class="displaymath process-math" id="example-exponential-MLE-1-5-2">
\begin{align*}
\L'(\lambda) \amp = 5 \lambda^4 e^{-3.1\lambda} + \lambda^5 e^{-3.1\lambda} (-3.1) \\
\amp = 5 \lambda^4 e^{-3.1\lambda} + \lambda^5 e^{-3.1\lambda} (-3.1) \\
\amp = \lambda^4 e^{-3.1\lambda} \left[5 - 3.1\lambda \right]
\end{align*}
</div>
<div class="para">The only critical point is <span class="process-math">\(5/3.1 \approx 1.61\text{.}\)</span> Since <span class="process-math">\(\L' \gt 0\)</span> on <span class="process-math">\((0, 1.61)\)</span> and <span class="process-math">\(\L' \lt 0\)</span> on <span class="process-math">\((1.61, \infty)\text{,}\)</span> there is a global maximum at <span class="process-math">\(\lambda = 1.61\text{,}\)</span> which is therefore the MLE.</div>
<div class="autopermalink" data-description="Paragraph"><a href="#example-exponential-MLE-1-5" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div> <div class="para" id="example-exponential-MLE-1-6">It may seem less clear how to generalize this calculation for other tables of data. Observe that the value <span class="process-math">\(3.1\)</span> is the sum of the five times in the table, so <span class="process-math">\(3.1/5\)</span> is the average time. The MLE turned out to be the reciprocal of the average time (just as the MLE with only one data point was the reciprocal of that one time). Notice that this does <em class="emphasis">not</em> match the guess we made previously of averaging the individual rate estimations for each data point.<div class="autopermalink" data-description="Paragraph"><a href="#example-exponential-MLE-1-6" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Example 4.1.11"><a href="#example-exponential-MLE" title="Copy heading and permalink for Example 4.1.11" aria-label="Copy heading and permalink for Example 4.1.11">🔗</a></div></article><article class="fact theorem-like" id="fact-MLE-exponential"><h3 class="heading">
<span class="type">Fact</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber">4.1.13</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">Exponential MLE.</span>
</h3>
<div class="para" id="fact-MLE-exponential-2-1">If we observe a Poisson process and see events occur after waiting times <span class="process-math">\(t_1, t_2, \dotsc, t_n\text{,}\)</span> then the MLE of the rate parameter <span class="process-math">\(\lambda\)</span> is <span class="process-math">\(\frac{n}{t_1 + t_2 + \dotsb + t_n}\text{.}\)</span><div class="autopermalink" data-description="Paragraph"><a href="#fact-MLE-exponential-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Fact 4.1.13: Exponential MLE"><a href="#fact-MLE-exponential" title="Copy heading and permalink for Fact 4.1.13: Exponential MLE" aria-label="Copy heading and permalink for Fact 4.1.13: Exponential MLE">🔗</a></div></article><section class="exercises" id="sec-Likelihood-20"><h3 class="heading hide-type">
<span class="type">Exercises</span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="codenumber"></span><span class="space heading-divison-mark heading-divison-mark__space"> </span><span class="title">Exercises</span>
</h3>
<article class="exercise exercise-like" id="sec-Likelihood-20-1"><h4 class="heading"><span class="codenumber">1<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h4>
<div class="para" id="sec-Likelihood-20-1-1-1">Suppose a coin has an unknown probability of coming up heads. We perform the experiment in five independent trials, during which it takes 4, 5, 4, 3, and 6 flips to see our first heads in each trial. What is the maximum likelihood estimation for the probability of the coin coming up heads on a flip?<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-20-1-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Exercise 4.1.1"><a href="#sec-Likelihood-20-1" title="Copy heading and permalink for Exercise 4.1.1" aria-label="Copy heading and permalink for Exercise 4.1.1">🔗</a></div></article><article class="exercise exercise-like" id="sec-Likelihood-20-2"><h4 class="heading"><span class="codenumber">2<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h4>
<div class="para" id="sec-Likelihood-20-2-1-1">Suppose a coin has an unknown probability of coming up heads. We perform the experiment in <span class="process-math">\(n\)</span> independent trials, during which it takes <span class="process-math">\(k_1, k_2, \dotsc, k_n\)</span> flips to see our first heads in each trial. Find a "common sense" MLE formula for the geometric distribution.<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-20-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="sec-Likelihood-20-2-2" class="hint solution-like born-hidden-knowl"><summary class="knowl__link"><span class="type">Hint</span><span class="period heading-divison-mark heading-divison-mark__period">.</span></summary><div class="hint solution-like knowl__content">
<div class="para" id="sec-Likelihood-20-2-2-1">You <em class="emphasis">could</em> set up a calculation analogous to <a href="sec-Likelihood.html#example-exponential-MLE" class="xref" data-knowl="./knowl/xref/example-exponential-MLE.html" data-reveal-label="Reveal" data-close-label="Close" title="Example 4.1.11">Example 4.1.11</a>. Or, you could consider <a href="sec-Likelihood.html#fact-MLE-binomial" class="xref" data-knowl="./knowl/xref/fact-MLE-binomial.html" data-reveal-label="Reveal" data-close-label="Close" title="Fact 4.1.8: Binomial MLE">Fact 4.1.8</a>.<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-20-2-2-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Hint 4.1.2.1"><a href="#sec-Likelihood-20-2-2" title="Copy heading and permalink for Hint 4.1.2.1" aria-label="Copy heading and permalink for Hint 4.1.2.1">🔗</a></div>
</div></details></div>
<div class="autopermalink" data-description="Exercise 4.1.2"><a href="#sec-Likelihood-20-2" title="Copy heading and permalink for Exercise 4.1.2" aria-label="Copy heading and permalink for Exercise 4.1.2">🔗</a></div></article><article class="exercise exercise-like" id="sec-Likelihood-20-3"><h4 class="heading"><span class="codenumber">3<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h4>
<div class="para" id="sec-Likelihood-20-3-1-1">A particular store owner wants to approximate the average hourly rate at which customers come into the store. They observe 80 customers enter during a particular 4-hour shift. What is the maximum likelihood estimation for the hourly customer rate?<div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-20-3-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Exercise 4.1.3"><a href="#sec-Likelihood-20-3" title="Copy heading and permalink for Exercise 4.1.3" aria-label="Copy heading and permalink for Exercise 4.1.3">🔗</a></div></article><article class="exercise exercise-like" id="sec-Likelihood-20-4"><h4 class="heading"><span class="codenumber">4<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h4>
<div class="para" id="sec-Likelihood-20-4-1-1">A radioactive material emits particles at an unknown probabilistic rate <span class="process-math">\(\lambda\)</span> particles per minute. We observe particles emitted at times 1.1, 1.7, 1.3, 2.2, 1.9, and 1.8 minutes. Write the likelihood function <span class="process-math">\(\mathcal{L}(\lambda)\)</span> based on this data. What is the maximum likelihood estimation for <span class="process-math">\(\lambda\text{?}\)</span><div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-20-4-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Exercise 4.1.4"><a href="#sec-Likelihood-20-4" title="Copy heading and permalink for Exercise 4.1.4" aria-label="Copy heading and permalink for Exercise 4.1.4">🔗</a></div></article><article class="exercise exercise-like" id="sec-Likelihood-20-5"><h4 class="heading"><span class="codenumber">5<span class="period heading-divison-mark heading-divison-mark__period">.</span></span></h4>
<div class="para" id="sec-Likelihood-20-5-1-1">Suppose a parameter <span class="process-math">\(\theta\)</span> takes values in <span class="process-math">\([0, 1]\)</span> with likelihood function <span class="process-math">\(\mathcal{L}(\theta) = \sqrt{\theta} - \theta^2\text{.}\)</span> Find the maximum likelihood estimation of <span class="process-math">\(\theta\text{.}\)</span><div class="autopermalink" data-description="Paragraph"><a href="#sec-Likelihood-20-5-1-1" title="Copy heading and permalink for Paragraph" aria-label="Copy heading and permalink for Paragraph">🔗</a></div>
</div>
<div class="autopermalink" data-description="Exercise 4.1.5"><a href="#sec-Likelihood-20-5" title="Copy heading and permalink for Exercise 4.1.5" aria-label="Copy heading and permalink for Exercise 4.1.5">🔗</a></div></article><div class="autopermalink" data-description="Exercises 4.1"><a href="#sec-Likelihood-20" title="Copy heading and permalink for Exercises 4.1" aria-label="Copy heading and permalink for Exercises 4.1">🔗</a></div></section><div class="autopermalink" data-description="Section 4.1: Likelihood"><a href="#sec-Likelihood" title="Copy heading and permalink for Section 4.1: Likelihood" aria-label="Copy heading and permalink for Section 4.1: Likelihood">🔗</a></div></section></div>
<div id="ptx-content-footer" class="ptx-content-footer">
<a class="previous-button button" href="ch-Confidence-Intervals.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-CLT.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>