added new articles

stat challenge day 4
This commit is contained in:
redoules 2018-11-11 21:55:53 +01:00
parent 59200f93c0
commit a5748cf18c
61 changed files with 1029 additions and 58 deletions

View File

@ -185,7 +185,7 @@ Mean : 43117.75, Median : 44627.5, Mode : 4978
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -219,7 +219,7 @@ Q1 : 6.0, Q2 : 12, Q3 : 16.0
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -429,7 +429,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -256,7 +256,7 @@ we call B the event "a blue ball is drawn" and R the event "a red ball is drawn"
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -0,0 +1,360 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Data Science for Political and Social Phenomena">
<meta name="author" content="Guillaume Redoulès">
<link rel="icon" href="../favicon.ico">
<title>Day 4 - Binomial and geometric distributions - Blog</title>
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="../theme/js/jquery.min.js"><\/script>')
</script>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="../theme/css/bootstrap.css" />
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link rel="stylesheet" type="text/css" href="../theme/css/ie10-viewport-bug-workaround.css" />
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="../theme/css/style.css" />
<link rel="stylesheet" type="text/css" href="../theme/css/notebooks.css" />
<link href='https://fonts.googleapis.com/css?family=PT+Serif:400,700|Roboto:400,500,700' rel='stylesheet' type='text/css'>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<meta name="tags" content="Basics" />
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">Guillaume Redoulès</a>
</div>
<div class="navbar-collapse collapse" id="searchbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../pages/about.html">About Guillaume</a></li>
<li><a href="https://github.com/redoules">GitHub</a></li>
<li><a href="https://www.linkedin.com/in/guillaume-redoul%C3%A8s-33923860/">LinkedIn</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Data Science<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="..#Blog">Blog</a></li>
<li><a href="..#Python">Python</a></li>
<li><a href="..#Bash">Bash</a></li>
<li><a href="..#SQL">SQL</a></li>
<li><a href="..#Mathematics">Mathematics</a></li>
<li><a href="..#Machine_Learning">Machine Learning</a></li>
<li><a href="..#Projects">Projects</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Projects<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/redoules/redoules.github.io">Notes (Github)</a></li>
</ul>
</li>
<!--<li class="dropdown">
<a href="../feeds/blog.rss.xml">Blog RSS</a>
</li>-->
</ul>
<form class="navbar-form" action="../search.html" onsubmit="return validateForm(this.elements['q'].value);">
<div class="form-group" style="display:inline;">
<div class="input-group" style="display:table;">
<span class="input-group-addon" style="width:1%;"><span class="glyphicon glyphicon-search"></span></span>
<input class="form-control search-query" name="q" id="tipue_search_input" placeholder="e.g. scikit KNN, pandas merge" required autocomplete="off" type="text">
</div>
</div>
</form>
</div>
<!--/.nav-collapse -->
</div>
</div>
<!-- end of header section -->
<div class="container">
<!-- <div class="alert alert-warning" role="alert">
Did you find this page useful? Please do me a quick favor and <a href="#" class="alert-link">endorse me for data science on LinkedIn</a>.
</div> -->
<section id="content" class="body">
<header>
<h1>
Day 4 - Binomial and geometric distributions
</h1>
<ol class="breadcrumb">
<li>
<time class="published" datetime="2018-11-11T10:19:00+01:00">
11 novembre 2018
</time>
</li>
<li>Blog</li>
<li>Basics</li>
</ol>
</header>
<div class='article_content'>
<h2>Binomial distribution</h2>
<h3>Problem 1</h3>
<p>The ratio of boys to girls for babies born in Russia is <span class="math">\(r=\frac{N_b}{N_g}=1.09\)</span>. If there is 1 child born per birth, what proportion of Russian families with exactly 6 children will have at least 3 boys?</p>
<h3>Mathematical explanation</h3>
<p>Let's first compute the probability of having a boy :</p>
<div class="math">$$p_b=\frac{N_b}{N_b+N_g}$$</div>
<p>where:
<em> <span class="math">\(N_b\)</span> is the number of boys
</em> <span class="math">\(N_g\)</span> is the number of girls
* <span class="math">\(r=\frac{N_b}{N_g}\)</span></p>
<div class="math">$$p_b=\frac{1}{1+\frac{1}{r}}$$</div>
<div class="math">$$p_b=\frac{r}{r+1}$$</div>
<div class="highlight"><pre><span></span><span class="n">r</span> <span class="o">=</span> <span class="mf">1.09</span>
<span class="n">p_b</span><span class="o">=</span><span class="n">r</span><span class="o">/</span><span class="p">(</span><span class="n">r</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;The probability of having a boy is p={p_b:3f}&quot;</span><span class="p">)</span>
</pre></div>
<div class="highlight"><pre><span></span>The probability of having a boy is p=0.521531
</pre></div>
<p>The probability of getting 3 boys in 6 children is given by :
</p>
<div class="math">$$b(x=3, n=6, p=p_b)$$</div>
<p>In order to compute the proportion of Russian families with exactly 6 children will have at 3 least boys we need to compute the cumulative probability distribution </p>
<div class="math">$$b(x\geq 3, n=6, p=p_b) = \sum_{i=3}^{6} b(x\geq i, n=6, p=p_b)$$</div>
<h3>Let's code it !</h3>
<div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">math</span>
<span class="k">def</span> <span class="nf">bi_dist</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span>
<span class="n">b</span> <span class="o">=</span> <span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">factorial</span><span class="p">(</span><span class="n">n</span><span class="p">)</span><span class="o">/</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">factorial</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">*</span><span class="n">math</span><span class="o">.</span><span class="n">factorial</span><span class="p">(</span><span class="n">n</span><span class="o">-</span><span class="n">x</span><span class="p">)))</span><span class="o">*</span><span class="p">(</span><span class="n">p</span><span class="o">**</span><span class="n">x</span><span class="p">)</span><span class="o">*</span><span class="p">((</span><span class="mi">1</span><span class="o">-</span><span class="n">p</span><span class="p">)</span><span class="o">**</span><span class="p">(</span><span class="n">n</span><span class="o">-</span><span class="n">x</span><span class="p">))</span>
<span class="k">return</span><span class="p">(</span><span class="n">b</span><span class="p">)</span>
<span class="n">b</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">n</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">p_b</span><span class="p">,</span> <span class="mi">6</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">7</span><span class="p">):</span>
<span class="n">b</span> <span class="o">+=</span> <span class="n">bi_dist</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;probability of getting at least 3 boys in a family with exactly 6 children : {b:.3f}&quot;</span><span class="p">)</span>
</pre></div>
<div class="highlight"><pre><span></span>probability of getting at least 3 boys in a family with exactly 6 children : 0.696
</pre></div>
<h3>Problem 2</h3>
<p>A manufacturer of metal pistons finds that, 12% on average, of the pistons they manufacture are rejected because they are incorrectly sized. What is the probability that a batch of 10 pistons will contain:
<em> No more than 2 rejects?
</em> At least 2 rejects?</p>
<h3>Mathematical explanation</h3>
<p>On average 12% of the pistons are rejected, this means that a piston has a probability of <span class="math">\(p_{rejected}=0.12\)</span> to be rejected.</p>
<p>The probability of getting less than 2 faulty pistons in a batch is :
</p>
<div class="math">$$p(rejet&lt;2) = b(x\leq 2, n= 10, p=p_{rejected})$$</div>
<div class="math">$$p(rejet&lt;2) = \sum_{i=0}^{2} b(x\leq i, n=10, p=p_{rejected})$$</div>
<div class="highlight"><pre><span></span><span class="n">b</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">n</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">12</span><span class="o">/</span><span class="mi">100</span><span class="p">,</span> <span class="mi">10</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span><span class="mi">3</span><span class="p">):</span>
<span class="n">b</span> <span class="o">+=</span> <span class="n">bi_dist</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;The probability of getting less than 2 faulty pistons in a batch is : {b:.3f}&quot;</span><span class="p">)</span>
</pre></div>
<div class="highlight"><pre><span></span>The probability of getting less than 2 faulty pistons in a batch is : 0.891
</pre></div>
<p>The probability that a batch of 10 pistons will contain at least 2 rejects :
</p>
<div class="math">$$p(rejet&lt;2) = b(x\geq 2, n= 10, p=p_{rejected})$$</div>
<div class="math">$$p(rejet&lt;2) = \sum_{i=2}^{10} b(x\geq i, n=10, p=p_{rejected})$$</div>
<div class="highlight"><pre><span></span><span class="n">b</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">n</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">12</span><span class="o">/</span><span class="mi">100</span><span class="p">,</span> <span class="mi">10</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">11</span><span class="p">):</span>
<span class="n">b</span> <span class="o">+=</span> <span class="n">bi_dist</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">p</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;The probability of getting at least 2 faulty pistons in a batch is : {b:.3f}&quot;</span><span class="p">)</span>
</pre></div>
<div class="highlight"><pre><span></span>The probability of getting at least 2 faulty pistons in a batch is : 0.342
</pre></div>
<h2>Geometric distribution</h2>
<h3>Problem 1</h3>
<p>The probability that a machine produces a defective product is <span class="math">\(\frac{1}{3}\)</span>. What is the probability that the first defect is found during the fith inspection?</p>
<h3>Mathematical explanation</h3>
<p>In this case, we will use a geometric distribution to evaluate the probability :
<em> <span class="math">\(n=5\)</span>
</em> <span class="math">\(p=\frac{1}{3}\)</span></p>
<p>Hence, the probability that the first defect is found during the fith inspection is <span class="math">\(g(n=5,p=1/3)\)</span></p>
<div class="highlight"><pre><span></span><span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;The probability that the first defect is found during the fith inspection is {round(((1-p)**(n-1)) * p, 3)}&quot;</span><span class="p">)</span>
</pre></div>
<div class="highlight"><pre><span></span>The probability that the first defect is found during the fith inspection is 0.038
</pre></div>
<h3>Problem 2</h3>
<p>The probability that a machine produces a defective product is <span class="math">\(\frac{1}{3}\)</span>. What is the probability that the first defect is found during the first 5 inspections?</p>
<h3>Mathematical explanation</h3>
<p>In this problem, we need to compute the cumulative distribution function
</p>
<div class="math">$$p(x \leq5) = \sum_{i=1}^{5} g(n=i,p=1/3)$$</div>
<div class="highlight"><pre><span></span><span class="n">p_x5</span> <span class="o">=</span> <span class="mi">0</span>
<span class="n">p</span><span class="o">=</span><span class="mi">1</span><span class="o">/</span><span class="mi">3</span>
<span class="n">n</span><span class="o">=</span><span class="mi">5</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="n">n</span><span class="o">+</span><span class="mi">1</span><span class="p">):</span>
<span class="n">p_x5</span><span class="o">+=</span><span class="p">(</span><span class="mi">1</span><span class="o">-</span><span class="n">p</span><span class="p">)</span><span class="o">**</span><span class="p">(</span><span class="n">i</span><span class="o">-</span><span class="mi">1</span><span class="p">)</span> <span class="o">*</span> <span class="n">p</span>
<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;The probability that the first defect is found during the first 5 inspection is {round(p_x5, 3)}&quot;</span><span class="p">)</span>
</pre></div>
<div class="highlight"><pre><span></span>The probability that the first defect is found during the first 5 inspection is 0.868
</pre></div>
<script type="text/javascript">if (!document.getElementById('mathjaxscript_pelican_#%@#$@#')) {
var align = "center",
indent = "0em",
linebreak = "false";
if (false) {
align = (screen.width < 768) ? "left" : align;
indent = (screen.width < 768) ? "0em" : indent;
linebreak = (screen.width < 768) ? 'true' : linebreak;
}
var mathjaxscript = document.createElement('script');
mathjaxscript.id = 'mathjaxscript_pelican_#%@#$@#';
mathjaxscript.type = 'text/javascript';
mathjaxscript.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=TeX-AMS-MML_HTMLorMML';
mathjaxscript[(window.opera ? "innerHTML" : "text")] =
"MathJax.Hub.Config({" +
" config: ['MMLorHTML.js']," +
" TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'AMS' } }," +
" jax: ['input/TeX','input/MathML','output/HTML-CSS']," +
" extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']," +
" displayAlign: '"+ align +"'," +
" displayIndent: '"+ indent +"'," +
" showMathMenu: true," +
" messageStyle: 'normal'," +
" tex2jax: { " +
" inlineMath: [ ['\\\\(','\\\\)'] ], " +
" displayMath: [ ['$$','$$'] ]," +
" processEscapes: true," +
" preview: 'TeX'," +
" }, " +
" 'HTML-CSS': { " +
" styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: 'inherit ! important'} }," +
" linebreaks: { automatic: "+ linebreak +", width: '90% container' }," +
" }, " +
"}); " +
"if ('default' !== 'default') {" +
"MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax['HTML-CSS'].FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"MathJax.Hub.Register.StartupHook('SVG Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"}";
(document.body || document.getElementsByTagName('head')[0]).appendChild(mathjaxscript);
}</script>
</div>
<aside>
<div class="bug-reporting__panel">
<h3>Find an error or bug? Have a suggestion?</h3>
<p>Everything on this site is avaliable on GitHub. Head on over and <a href='https://github.com/redoules/redoules.github.io/issues/new'>submit an issue.</a> You can also message me directly by <a href='mailto:guillaume.redoules@gadz.org'>email</a>.</p>
</div>
</aside>
</section>
</div>
<!-- start of footer section -->
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.
</center>
</p>
</div>
</footer>
<!-- This jQuery line finds any span that contains code highlighting classes and then selects the parent <pre> tag and adds a border. This is done as a workaround to visually distinguish the code inputs and outputs -->
<script>
$( ".hll, .n, .c, .err, .k, .o, .cm, .cp, .c1, .cs, .gd, .ge, .gr, .gh, .gi, .go, .gp, .gs, .gu, .gt, .kc, .kd, .kn, .kp, .kr, .kt, .m, .s, .na, .nb, .nc, .no, .nd, .ni, .ne, .nf, .nl, .nn, .nt, .nv, .ow, .w, .mf, .mh, .mi, .mo, .sb, .sc, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss, .bp, .vc, .vg, .vi, .il" ).parent( "pre" ).css( "border", "1px solid #DEDEDE" );
</script>
<!-- Load Google Analytics -->
<script>
/*
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-66582-32', 'auto');
ga('send', 'pageview');
*/
</script>
<!-- End of Google Analytics -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../theme/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../theme/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

View File

@ -286,7 +286,7 @@ maxuploadtarget=5000
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -161,7 +161,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -120,6 +120,7 @@
<div class="panel panel-default">
<div class="panel-body">
<ul>
<li><a href="./blog/Statistics_10days-day4.html">11/18 Day 4 - Binomial and geometric distributions</a></li>
<li><a href="./blog/Statistics_10days-day3.html">11/18 Day 3 - Conditionnal probability</a></li>
<li><a href="./blog/Statistics_10days-day2.html">11/18 Day 2 - Probability, Compound Event Probability</a></li>
<li><a href="./blog/Statistics_10days-day1.html">11/18 Day 1 - Quartiles, Interquartile Range and standard deviation</a></li>
@ -629,6 +630,8 @@
</div>
<div class="panel-body">
<ul>
<li><a href="./mathematics/Geometric.html">Geometric distribution</a></li>
<li><a href="./mathematics/Binomial.html">Binomial distribution</a></li>
<li><a href="./mathematics/Premutations_and_combinations.html">Premutations and combinations</a></li>
<li><a href="./mathematics/cond_prob.html">Conditional Probability</a></li>
<li><a href="./mathematics/Bayes.html">Bayes' Theorem</a></li>
@ -701,7 +704,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -149,7 +149,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -211,7 +211,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -144,7 +144,7 @@ However, you can use the following command to do it </p>
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -143,7 +143,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -203,7 +203,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -148,7 +148,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -167,7 +167,7 @@ none 0 0 0 - /config
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -256,7 +256,7 @@ wifi0 Link encap:UNSPEC HWaddr 5C-51-4F-41-7A-AD-00-00-00-00-00-00-00-00-00
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -172,7 +172,7 @@ USER;PID;%CPU;%MEM;VSZ;RSS;TTY;STAT;START;TIME;COMMAND</p>
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -158,7 +158,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -151,7 +151,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -208,7 +208,7 @@ The secret number is 126
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -160,7 +160,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -1033,7 +1033,7 @@ Top dislike features:
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -196,7 +196,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

305
mathematics/Binomial.html Normal file
View File

@ -0,0 +1,305 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Data Science for Political and Social Phenomena">
<meta name="author" content="Guillaume Redoulès">
<link rel="icon" href="../favicon.ico">
<title>Binomial distribution - Mathematics</title>
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="../theme/js/jquery.min.js"><\/script>')
</script>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="../theme/css/bootstrap.css" />
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link rel="stylesheet" type="text/css" href="../theme/css/ie10-viewport-bug-workaround.css" />
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="../theme/css/style.css" />
<link rel="stylesheet" type="text/css" href="../theme/css/notebooks.css" />
<link href='https://fonts.googleapis.com/css?family=PT+Serif:400,700|Roboto:400,500,700' rel='stylesheet' type='text/css'>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<meta name="tags" content="Statistics" />
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">Guillaume Redoulès</a>
</div>
<div class="navbar-collapse collapse" id="searchbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../pages/about.html">About Guillaume</a></li>
<li><a href="https://github.com/redoules">GitHub</a></li>
<li><a href="https://www.linkedin.com/in/guillaume-redoul%C3%A8s-33923860/">LinkedIn</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Data Science<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="..#Blog">Blog</a></li>
<li><a href="..#Python">Python</a></li>
<li><a href="..#Bash">Bash</a></li>
<li><a href="..#SQL">SQL</a></li>
<li><a href="..#Mathematics">Mathematics</a></li>
<li><a href="..#Machine_Learning">Machine Learning</a></li>
<li><a href="..#Projects">Projects</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Projects<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/redoules/redoules.github.io">Notes (Github)</a></li>
</ul>
</li>
<!--<li class="dropdown">
<a href="../feeds/blog.rss.xml">Blog RSS</a>
</li>-->
</ul>
<form class="navbar-form" action="../search.html" onsubmit="return validateForm(this.elements['q'].value);">
<div class="form-group" style="display:inline;">
<div class="input-group" style="display:table;">
<span class="input-group-addon" style="width:1%;"><span class="glyphicon glyphicon-search"></span></span>
<input class="form-control search-query" name="q" id="tipue_search_input" placeholder="e.g. scikit KNN, pandas merge" required autocomplete="off" type="text">
</div>
</div>
</form>
</div>
<!--/.nav-collapse -->
</div>
</div>
<!-- end of header section -->
<div class="container">
<!-- <div class="alert alert-warning" role="alert">
Did you find this page useful? Please do me a quick favor and <a href="#" class="alert-link">endorse me for data science on LinkedIn</a>.
</div> -->
<section id="content" class="body">
<header>
<h1>
Binomial distribution
</h1>
<ol class="breadcrumb">
<li>
<time class="published" datetime="2018-11-11T11:19:00+01:00">
11 novembre 2018
</time>
</li>
<li>Mathematics</li>
<li>Statistics</li>
</ol>
</header>
<div class='article_content'>
<h2>Binomial Experiment</h2>
<p>A binomial experiment (or Bernoulli trial) is a statistical experiment that has the following properties:</p>
<ul>
<li>The experiment consists of n repeated trials.</li>
<li>The trials are independent.</li>
<li>The outcome of each trial is either success (s) or failure (f).</li>
</ul>
<h2>Binomial Distribution</h2>
<p>We define a binomial process to be a binomial experiment meeting the following conditions:</p>
<ul>
<li>The number of successes is <span class="math">\(x\)</span>.</li>
<li>The total number of trials is <span class="math">\(n\)</span>.</li>
<li>The probability of success of 1 trial is <span class="math">\(p\)</span>.</li>
<li>The probability of failure of 1 trial <span class="math">\(q\)</span>, where <span class="math">\(q=1-p\)</span>.</li>
<li><span class="math">\(b(x,n,p)\)</span> is the <em>binomial probability</em>, meaning the probability of having exactly <span class="math">\(x\)</span> successes out of <span class="math">\(n\)</span> trials.</li>
</ul>
<p>The binomial random variable is the number of successes, <span class="math">\(x\)</span>, out of <span class="math">\(n\)</span> trials.</p>
<p>The binomial distribution is the probability distribution for the binomial random variable, given by the following probability mass function:</p>
<div class="math">$$b(x,n,p) = \frac{n!}{x!(n-x)!}p^xq^{n-x}$$</div>
<p>Python code for the Binomial distribution</p>
<div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">math</span>
<span class="k">def</span> <span class="nf">bi_dist</span><span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">n</span><span class="p">,</span> <span class="n">p</span><span class="p">):</span>
<span class="n">b</span> <span class="o">=</span> <span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">factorial</span><span class="p">(</span><span class="n">n</span><span class="p">)</span><span class="o">/</span><span class="p">(</span><span class="n">math</span><span class="o">.</span><span class="n">factorial</span><span class="p">(</span><span class="n">x</span><span class="p">)</span><span class="o">*</span><span class="n">math</span><span class="o">.</span><span class="n">factorial</span><span class="p">(</span><span class="n">n</span><span class="o">-</span><span class="n">x</span><span class="p">)))</span><span class="o">*</span><span class="p">(</span><span class="n">p</span><span class="o">**</span><span class="n">x</span><span class="p">)</span><span class="o">*</span><span class="p">((</span><span class="mi">1</span><span class="o">-</span><span class="n">p</span><span class="p">)</span><span class="o">**</span><span class="p">(</span><span class="n">n</span><span class="o">-</span><span class="n">x</span><span class="p">))</span>
<span class="k">return</span><span class="p">(</span><span class="n">b</span><span class="p">)</span>
</pre></div>
<p>Using numpy </p>
<div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">numpy</span> <span class="kn">as</span> <span class="nn">np</span>
<span class="n">n</span> <span class="o">=</span> <span class="mi">10</span> <span class="c1">#number of coin toss</span>
<span class="n">p</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="c1">#probability</span>
<span class="n">samples</span> <span class="o">=</span> <span class="mi">1000</span> <span class="c1">#number of samples</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">np</span><span class="o">.</span><span class="n">random</span><span class="o">.</span><span class="n">binomial</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">samples</span><span class="p">)</span>
</pre></div>
<p>Using the stats module from scipy</p>
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">scipy.stats</span> <span class="kn">import</span> <span class="n">binom</span>
<span class="n">n</span> <span class="o">=</span> <span class="mi">10</span> <span class="c1">#number of coin toss</span>
<span class="n">p</span> <span class="o">=</span> <span class="mf">0.5</span> <span class="c1">#probability</span>
<span class="n">samples</span> <span class="o">=</span> <span class="mi">1000</span> <span class="c1">#number of samples</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">binom</span><span class="o">.</span><span class="n">rvs</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">p</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="n">samples</span><span class="p">)</span>
</pre></div>
<h2>Cumulative probabilities</h2>
<p>A cumulative probability refers to the probability that the value of a random variable falls within a specified range. Frequently, cumulative probabilities refer to the probability that a random variable is less than or equal to a specified value. </p>
<p>A fair coin is tossed 10 times. </p>
<h3>Probability of getting 5 heads</h3>
<p>The probability of getting heads is:
</p>
<div class="math">$$b(x=5, n=10, p=0.5)=0.246$$</div>
<h3>Probability of getting at least 5 heads</h3>
<p>The probability of getting at least heads is: </p>
<div class="math">$$b(x\geq 5, n=10, p=0.5)= \sum_{r=5}^{10} b(x=r, n=10, p=0.5)$$</div>
<div class="math">$$b(x\geq 5, n=10, p=0.5)= 0.623$$</div>
<h3>Probability of getting at most 5 heads</h3>
<p>The probability of getting at most heads is: </p>
<div class="math">$$b(x\leq 5, n=10, p=0.5)= \sum_{r=0}^{5} b(x=r, n=10, p=0.5)$$</div>
<div class="math">$$b(x\leq 5, n=10, p=0.5)= 0.623$$</div>
<script type="text/javascript">if (!document.getElementById('mathjaxscript_pelican_#%@#$@#')) {
var align = "center",
indent = "0em",
linebreak = "false";
if (false) {
align = (screen.width < 768) ? "left" : align;
indent = (screen.width < 768) ? "0em" : indent;
linebreak = (screen.width < 768) ? 'true' : linebreak;
}
var mathjaxscript = document.createElement('script');
mathjaxscript.id = 'mathjaxscript_pelican_#%@#$@#';
mathjaxscript.type = 'text/javascript';
mathjaxscript.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=TeX-AMS-MML_HTMLorMML';
mathjaxscript[(window.opera ? "innerHTML" : "text")] =
"MathJax.Hub.Config({" +
" config: ['MMLorHTML.js']," +
" TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'AMS' } }," +
" jax: ['input/TeX','input/MathML','output/HTML-CSS']," +
" extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']," +
" displayAlign: '"+ align +"'," +
" displayIndent: '"+ indent +"'," +
" showMathMenu: true," +
" messageStyle: 'normal'," +
" tex2jax: { " +
" inlineMath: [ ['\\\\(','\\\\)'] ], " +
" displayMath: [ ['$$','$$'] ]," +
" processEscapes: true," +
" preview: 'TeX'," +
" }, " +
" 'HTML-CSS': { " +
" styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: 'inherit ! important'} }," +
" linebreaks: { automatic: "+ linebreak +", width: '90% container' }," +
" }, " +
"}); " +
"if ('default' !== 'default') {" +
"MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax['HTML-CSS'].FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"MathJax.Hub.Register.StartupHook('SVG Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"}";
(document.body || document.getElementsByTagName('head')[0]).appendChild(mathjaxscript);
}</script>
</div>
<aside>
<div class="bug-reporting__panel">
<h3>Find an error or bug? Have a suggestion?</h3>
<p>Everything on this site is avaliable on GitHub. Head on over and <a href='https://github.com/redoules/redoules.github.io/issues/new'>submit an issue.</a> You can also message me directly by <a href='mailto:guillaume.redoules@gadz.org'>email</a>.</p>
</div>
</aside>
</section>
</div>
<!-- start of footer section -->
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.
</center>
</p>
</div>
</footer>
<!-- This jQuery line finds any span that contains code highlighting classes and then selects the parent <pre> tag and adds a border. This is done as a workaround to visually distinguish the code inputs and outputs -->
<script>
$( ".hll, .n, .c, .err, .k, .o, .cm, .cp, .c1, .cs, .gd, .ge, .gr, .gh, .gi, .go, .gp, .gs, .gu, .gt, .kc, .kd, .kn, .kp, .kr, .kt, .m, .s, .na, .nb, .nc, .no, .nd, .ni, .ne, .nf, .nl, .nn, .nt, .nv, .ow, .w, .mf, .mh, .mi, .mo, .sb, .sc, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss, .bp, .vc, .vg, .vi, .il" ).parent( "pre" ).css( "border", "1px solid #DEDEDE" );
</script>
<!-- Load Google Analytics -->
<script>
/*
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-66582-32', 'auto');
ga('send', 'pageview');
*/
</script>
<!-- End of Google Analytics -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../theme/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../theme/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

282
mathematics/Geometric.html Normal file
View File

@ -0,0 +1,282 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="description" content="Data Science for Political and Social Phenomena">
<meta name="author" content="Guillaume Redoulès">
<link rel="icon" href="../favicon.ico">
<title>Geometric distribution - Mathematics</title>
<!-- JQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
window.jQuery || document.write('<script src="../theme/js/jquery.min.js"><\/script>')
</script>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="../theme/css/bootstrap.css" />
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<link rel="stylesheet" type="text/css" href="../theme/css/ie10-viewport-bug-workaround.css" />
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="../theme/css/style.css" />
<link rel="stylesheet" type="text/css" href="../theme/css/notebooks.css" />
<link href='https://fonts.googleapis.com/css?family=PT+Serif:400,700|Roboto:400,500,700' rel='stylesheet' type='text/css'>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<meta name="tags" content="Statistics" />
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="..">Guillaume Redoulès</a>
</div>
<div class="navbar-collapse collapse" id="searchbar">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">About<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="../pages/about.html">About Guillaume</a></li>
<li><a href="https://github.com/redoules">GitHub</a></li>
<li><a href="https://www.linkedin.com/in/guillaume-redoul%C3%A8s-33923860/">LinkedIn</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Data Science<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="..#Blog">Blog</a></li>
<li><a href="..#Python">Python</a></li>
<li><a href="..#Bash">Bash</a></li>
<li><a href="..#SQL">SQL</a></li>
<li><a href="..#Mathematics">Mathematics</a></li>
<li><a href="..#Machine_Learning">Machine Learning</a></li>
<li><a href="..#Projects">Projects</a></li>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Projects<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="https://github.com/redoules/redoules.github.io">Notes (Github)</a></li>
</ul>
</li>
<!--<li class="dropdown">
<a href="../feeds/blog.rss.xml">Blog RSS</a>
</li>-->
</ul>
<form class="navbar-form" action="../search.html" onsubmit="return validateForm(this.elements['q'].value);">
<div class="form-group" style="display:inline;">
<div class="input-group" style="display:table;">
<span class="input-group-addon" style="width:1%;"><span class="glyphicon glyphicon-search"></span></span>
<input class="form-control search-query" name="q" id="tipue_search_input" placeholder="e.g. scikit KNN, pandas merge" required autocomplete="off" type="text">
</div>
</div>
</form>
</div>
<!--/.nav-collapse -->
</div>
</div>
<!-- end of header section -->
<div class="container">
<!-- <div class="alert alert-warning" role="alert">
Did you find this page useful? Please do me a quick favor and <a href="#" class="alert-link">endorse me for data science on LinkedIn</a>.
</div> -->
<section id="content" class="body">
<header>
<h1>
Geometric distribution
</h1>
<ol class="breadcrumb">
<li>
<time class="published" datetime="2018-11-11T21:19:00+01:00">
11 novembre 2018
</time>
</li>
<li>Mathematics</li>
<li>Statistics</li>
</ol>
</header>
<div class='article_content'>
<h2>Negative Binomial Experiment</h2>
<p>A negative binomial experiment is a statistical experiment that has the following properties:</p>
<ul>
<li>The experiment consists of n repeated trials.</li>
<li>The trials are independent.</li>
<li>The outcome of each trial is either success (s) or failure (f).</li>
<li><span class="math">\(P(s)\)</span> is the same for every trial.</li>
<li>The experiment continues until x successes are observed</li>
</ul>
<p>If <span class="math">\(X\)</span> is the number of experiments until the <span class="math">\(x^{th}\)</span> success occures, then <span class="math">\(X\)</span> is a discrete random variable called a negative binomial</p>
<h2>Negative Binomial Distribution</h2>
<p>Consider the following probability mass function:
</p>
<div class="math">$$b^*(x,n,p) = {\binom{n-1}{x-1}}p^xq^{n-x}$$</div>
<p>
The function above is negative binomial and has the following properties:</p>
<ul>
<li>The number of successes to be observed is <span class="math">\(x\)</span>.</li>
<li>The total number of trials is <span class="math">\(n\)</span>.</li>
<li>The probability of success of 1 trial is <span class="math">\(p\)</span>.</li>
<li>The probability of failure of 1 trial <span class="math">\(q\)</span>, where <span class="math">\(q=1-p\)</span>.</li>
<li><span class="math">\(b^*(x,n,p)\)</span> is the <em>negative binomial probability</em>, meaning the probability of having exactly <span class="math">\(x-1\)</span> successes out of <span class="math">\(n-1\)</span> trials and having <span class="math">\(x\)</span> successes after <span class="math">\(n\)</span> trials.</li>
</ul>
<h2>Geometric Distribution</h2>
<p>The geometric distribution is a special case of the negative binomial distribution that deals with the number of Bernoulli trials required to get a success (i.e., counting the number of failures before the first success). Recall that <span class="math">\(X\)</span> is the number of successes in <span class="math">\(n\)</span> independent Bernoulli trials, so for each <span class="math">\(i\)</span> (where $1\leq i\leq n):</p>
<p>$ X_i = </p>
<div class="math">\begin{cases}
1 if the i^{th} trial is a success \\
0 otherwise x
\end{cases}</div>
<p>
$</p>
<p>The geometric distribution is a negative binomial distribution where the number of successes is 1. We express this with the following formula:</p>
<div class="math">$$g(n,p)=q^{n-1}p$$</div>
<h3>Example</h3>
<p>Bob is a high school basketball player. He is a 70% free throw shooter, meaning his probability of making a free throw is 0.7. What is the probability that Bob makes his first free throw on his fifth shot?</p>
<p>For this experiment n=5, p=0.7 and q=0.3
So :
</p>
<div class="math">$$g(n=5, p=0.7)=0.3^4 0.7=0.00567$$</div>
<script type="text/javascript">if (!document.getElementById('mathjaxscript_pelican_#%@#$@#')) {
var align = "center",
indent = "0em",
linebreak = "false";
if (false) {
align = (screen.width < 768) ? "left" : align;
indent = (screen.width < 768) ? "0em" : indent;
linebreak = (screen.width < 768) ? 'true' : linebreak;
}
var mathjaxscript = document.createElement('script');
mathjaxscript.id = 'mathjaxscript_pelican_#%@#$@#';
mathjaxscript.type = 'text/javascript';
mathjaxscript.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/latest.js?config=TeX-AMS-MML_HTMLorMML';
mathjaxscript[(window.opera ? "innerHTML" : "text")] =
"MathJax.Hub.Config({" +
" config: ['MMLorHTML.js']," +
" TeX: { extensions: ['AMSmath.js','AMSsymbols.js','noErrors.js','noUndefined.js'], equationNumbers: { autoNumber: 'AMS' } }," +
" jax: ['input/TeX','input/MathML','output/HTML-CSS']," +
" extensions: ['tex2jax.js','mml2jax.js','MathMenu.js','MathZoom.js']," +
" displayAlign: '"+ align +"'," +
" displayIndent: '"+ indent +"'," +
" showMathMenu: true," +
" messageStyle: 'normal'," +
" tex2jax: { " +
" inlineMath: [ ['\\\\(','\\\\)'] ], " +
" displayMath: [ ['$$','$$'] ]," +
" processEscapes: true," +
" preview: 'TeX'," +
" }, " +
" 'HTML-CSS': { " +
" styles: { '.MathJax_Display, .MathJax .mo, .MathJax .mi, .MathJax .mn': {color: 'inherit ! important'} }," +
" linebreaks: { automatic: "+ linebreak +", width: '90% container' }," +
" }, " +
"}); " +
"if ('default' !== 'default') {" +
"MathJax.Hub.Register.StartupHook('HTML-CSS Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax['HTML-CSS'].FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"MathJax.Hub.Register.StartupHook('SVG Jax Ready',function () {" +
"var VARIANT = MathJax.OutputJax.SVG.FONTDATA.VARIANT;" +
"VARIANT['normal'].fonts.unshift('MathJax_default');" +
"VARIANT['bold'].fonts.unshift('MathJax_default-bold');" +
"VARIANT['italic'].fonts.unshift('MathJax_default-italic');" +
"VARIANT['-tex-mathit'].fonts.unshift('MathJax_default-italic');" +
"});" +
"}";
(document.body || document.getElementsByTagName('head')[0]).appendChild(mathjaxscript);
}</script>
</div>
<aside>
<div class="bug-reporting__panel">
<h3>Find an error or bug? Have a suggestion?</h3>
<p>Everything on this site is avaliable on GitHub. Head on over and <a href='https://github.com/redoules/redoules.github.io/issues/new'>submit an issue.</a> You can also message me directly by <a href='mailto:guillaume.redoules@gadz.org'>email</a>.</p>
</div>
</aside>
</section>
</div>
<!-- start of footer section -->
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.
</center>
</p>
</div>
</footer>
<!-- This jQuery line finds any span that contains code highlighting classes and then selects the parent <pre> tag and adds a border. This is done as a workaround to visually distinguish the code inputs and outputs -->
<script>
$( ".hll, .n, .c, .err, .k, .o, .cm, .cp, .c1, .cs, .gd, .ge, .gr, .gh, .gi, .go, .gp, .gs, .gu, .gt, .kc, .kd, .kn, .kp, .kr, .kt, .m, .s, .na, .nb, .nc, .no, .nd, .ni, .ne, .nf, .nl, .nn, .nt, .nv, .ow, .w, .mf, .mh, .mi, .mo, .sb, .sc, .sd, .s2, .se, .sh, .si, .sx, .sr, .s1, .ss, .bp, .vc, .vg, .vi, .il" ).parent( "pre" ).css( "border", "1px solid #DEDEDE" );
</script>
<!-- Load Google Analytics -->
<script>
/*
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-66582-32', 'auto');
ga('send', 'pageview');
*/
</script>
<!-- End of Google Analytics -->
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../theme/js/bootstrap.min.js"></script>
<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
<script src="../theme/js/ie10-viewport-bug-workaround.js"></script>
</body>
</html>

View File

@ -195,7 +195,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -203,7 +203,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -197,7 +197,7 @@ and B are considered to be independent if event A has no effect on the probabili
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -145,7 +145,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -192,7 +192,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -241,7 +241,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -235,7 +235,7 @@ At line 5 there is a plum which is purple and contains 28 kcal
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -378,7 +378,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -168,7 +168,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -192,7 +192,7 @@ If you try to open a non existing file in read mode 'r', a FileNotFoundError wil
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -176,7 +176,7 @@ conda install numpy --channel intel --override-channels
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -237,7 +237,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -186,7 +186,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -171,7 +171,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -339,7 +339,7 @@ However, exporting to a sql database can prove very useful. Indeed, having a wel
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -181,7 +181,7 @@ The number 4 appears 1 times in the list
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -338,7 +338,7 @@ http://127.0.0.1:8787/status</p>
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -148,7 +148,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -232,7 +232,7 @@ The list of dependencies required to test, build and generate the doc are listed
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -164,7 +164,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -218,7 +218,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -177,7 +177,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -213,7 +213,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -248,7 +248,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -173,7 +173,7 @@ Reversed array : [4 3 2 1 0]
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -192,7 +192,7 @@ Sorted array : [0.13876208 0.19939047 0.40021786 0.43734158 0.46015169]
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -381,7 +381,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -171,7 +171,7 @@ Numpy array with unique values : [10 20 30 40 50 60]
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -151,7 +151,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -112,7 +112,7 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -5,7 +5,7 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>redoules.github.io/</loc>
<lastmod>2018-11-10T13:04:27-00:00</lastmod>
<lastmod>2018-11-11T21:55:09-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
@ -17,6 +17,27 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<priority>0.5</priority>
</url>
<url>
<loc>redoules.github.io/mathematics/Geometric.html</loc>
<lastmod>2018-11-11T21:19:00+01:00</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>redoules.github.io/mathematics/Binomial.html</loc>
<lastmod>2018-11-11T11:19:00+01:00</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>redoules.github.io/blog/Statistics_10days-day4.html</loc>
<lastmod>2018-11-11T10:19:00+01:00</lastmod>
<changefreq>monthly</changefreq>
<priority>0.5</priority>
</url>
<url>
<loc>redoules.github.io/mathematics/Premutations_and_combinations.html</loc>
<lastmod>2018-11-10T12:35:00+01:00</lastmod>

View File

@ -344,7 +344,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -631,7 +631,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -216,7 +216,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

View File

@ -346,7 +346,7 @@ Done.
<footer class="footer">
<div class="container">
<p class="text-muted">
<center>This project contains 53 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<center>This project contains 56 pages and is available on <a href="https://github.com/redoules/redoules.github.io">GitHub</a>.
<br/>
Copyright &copy; Guillaume Redoulès,
<time datetime="2018">2018</time>.

File diff suppressed because one or more lines are too long