Skip to content

Commit

Permalink
minor modify
Browse files Browse the repository at this point in the history
minor modify
  • Loading branch information
math4mad committed Oct 20, 2023
1 parent 65f7652 commit 7e4e855
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
"href": "statistics/13-understand-bayes.html#plot-results",
"title": "13-understanding-bayes",
"section": "3. plot results",
"text": "3. plot results\n\n3.1 10 次硬币试验,6 次正面\n两个点的高度相除就是基于实验观察的赔率\n\nplot_likelihood()\n\n\n\n\n\n\n3.2 100次试验 60 次正面\n\nplot_likelihood(;p=0.6,n=100,s=60)\n\n\n\n\n\n\n3.3 500次试验,300 次正面\n\nplot_likelihood(;p=0.6,n=500,s=300)"
"text": "3. plot results\n\n3.1 10 次硬币试验,6 次正面\n两个点的高度相除就是基于实验观察的赔率\n\nplot_likelihood()\n\n\n\n\n\n\n3.2 100次试验 60 次正面\n\nplot_likelihood(;p=0.6,n=100,s=60)\n\n\n\n\n\n\n3.3 500次试验,300 次正面\n\nplot_likelihood(;p=0.6,n=500,s=300)\n\n\n\n\n\n在上述实验中模型参数是事先知道的:p(head)=0.6,但是对于很多问题, 参数未知. 在这种情况下, 如果给定两个参数, 优先选择赔率最大的参数作为估计"
},
{
"objectID": "statistics/10-dirichlet-dist.html",
Expand Down
11 changes: 7 additions & 4 deletions docs/statistics/13-understand-bayes.html
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ <h2 class="anchored" data-anchor-id="define-likelihood-function">2. define likel
<span id="cb2-14"><a href="#cb2-14" aria-hidden="true" tabindex="-1"></a> <span class="fu">axislegend</span>(halign <span class="op">=:</span>left, valign <span class="op">=:</span>top)</span>
<span id="cb2-15"><a href="#cb2-15" aria-hidden="true" tabindex="-1"></a> fig</span>
<span id="cb2-16"><a href="#cb2-16" aria-hidden="true" tabindex="-1"></a><span class="kw">end</span></span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="53">
<div class="cell-output cell-output-display" data-execution_count="10">
<pre><code>plot_likelihood (generic function with 1 method)</code></pre>
</div>
</div>
Expand All @@ -397,7 +397,7 @@ <h3 class="anchored" data-anchor-id="次硬币试验6-次正面">3.1 10 次硬
<p>两个点的高度相除就是基于实验观察的赔率</p>
<div class="cell" data-execution_count="3">
<div class="sourceCode cell-code" id="cb4"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">plot_likelihood</span>()</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="54">
<div class="cell-output cell-output-display" data-execution_count="11">
<p><img src="13-understand-bayes_files/figure-html/cell-4-output-1.png" class="img-fluid"></p>
</div>
</div>
Expand All @@ -406,7 +406,7 @@ <h3 class="anchored" data-anchor-id="次硬币试验6-次正面">3.1 10 次硬
<h3 class="anchored" data-anchor-id="次试验-60-次正面">3.2 100次试验 60 次正面</h3>
<div class="cell" data-execution_count="4">
<div class="sourceCode cell-code" id="cb5"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">plot_likelihood</span>(;p<span class="op">=</span><span class="fl">0.6</span>,n<span class="op">=</span><span class="fl">100</span>,s<span class="op">=</span><span class="fl">60</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="55">
<div class="cell-output cell-output-display" data-execution_count="12">
<p><img src="13-understand-bayes_files/figure-html/cell-5-output-1.png" class="img-fluid"></p>
</div>
</div>
Expand All @@ -415,10 +415,13 @@ <h3 class="anchored" data-anchor-id="次试验-60-次正面">3.2 100次试验 60
<h3 class="anchored" data-anchor-id="次试验300-次正面">3.3 500次试验,300 次正面</h3>
<div class="cell" data-execution_count="5">
<div class="sourceCode cell-code" id="cb6"><pre class="sourceCode julia code-with-copy"><code class="sourceCode julia"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="fu">plot_likelihood</span>(;p<span class="op">=</span><span class="fl">0.6</span>,n<span class="op">=</span><span class="fl">500</span>,s<span class="op">=</span><span class="fl">300</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-display" data-execution_count="56">
<div class="cell-output cell-output-display" data-execution_count="13">
<p><img src="13-understand-bayes_files/figure-html/cell-6-output-1.png" class="img-fluid"></p>
</div>
</div>
<div class="callout-info" title="讨论">
<p>在上述实验中模型参数是事先知道的:<code>p(head)=0.6</code>,但是对于很多问题, 参数未知. 在这种情况下, 如果给定两个参数, 优先选择赔率最大的参数作为估计</p>
</div>


</section>
Expand Down
9 changes: 8 additions & 1 deletion statistics/13-understand-bayes.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,11 @@ plot_likelihood(;p=0.6,n=100,s=60)

```{julia}
plot_likelihood(;p=0.6,n=500,s=300)
```
```

:::{.callout-info title="讨论"}
在上述实验中模型参数是事先知道的:`p(head)=0.6`,但是对于很多问题,
参数未知.
在这种情况下, 如果给定两个参数, 优先选择赔率最大的参数作为估计

:::

0 comments on commit 7e4e855

Please sign in to comment.