Skip to content

Commit

Permalink
modify navigate to auto build , ex3.30 to emoji
Browse files Browse the repository at this point in the history
modify  navigate to auto build , ex3.30 to emoji
  • Loading branch information
math4mad committed Sep 29, 2023
1 parent eeb8473 commit 05f7df0
Show file tree
Hide file tree
Showing 60 changed files with 220 additions and 148 deletions.
6 changes: 3 additions & 3 deletions _freeze/exercises/afcp-ex3.1/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"hash": "f2c6ad73997dc9c00a79569b2ffa9cbe",
"hash": "3a388b949cc4f9bc41b45f22d86470cc",
"result": {
"markdown": "---\ntitle: 1. question\n---\n\n\n ex3.1 掷两枚均匀的骰子,求已知两枚骰子点数不同的条件下,至少有一枚点数为6 的条件概率。\n \n - 1. 首先构建出总的概率空间: 扔两枚骰子的组合\n - 2. 筛选出点数不同的组合作为子空间\n - 3. 在2子空间下筛选出至少有一个骰子为6 的组合\n - 4. 根据 2,3 计算条件概率\n\n### 2. total probablity space \n\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\n ma=[[x,y] for x in 1:6, y in 1:6]|>d->reshape(d,(1,36))\n\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n1×36 Matrix{Vector{Int64}}:\n [1, 1] [2, 1] [3, 1] [4, 1] [5, 1] … [3, 6] [4, 6] [5, 6] [6, 6]\n```\n:::\n:::\n\n\n### 3. according to condition to get sub probability space \n```julia\n#数组两个数不同\ncondition(x::Array)=x[1] !=x[2] \n```\n\n::: {.cell execution_count=2}\n``` {.julia .cell-code}\n condition(x::Array)=x[1] !=x[2]\n pA=filter(x->condition(x),vec(ma))\n show(pA)\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n[[2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [1, 2], [3, 2], [4, 2], [5, 2], [6, 2], [1, 3], [2, 3], [4, 3], [5, 3], [6, 3], [1, 4], [2, 4], [3, 4], [5, 4], [6, 4], [1, 5], [2, 5], [3, 5], [4, 5], [6, 5], [1, 6], [2, 6], [3, 6], [4, 6], [5, 6]]\n```\n:::\n:::\n\n\n```julia\n #数组中两个数有至少有一个等于 6\n x->x[1]==6||x[2]==6\n```\n### 4. conditional probablity\n\n::: {.cell execution_count=3}\n``` {.julia .cell-code}\n pB=filter(x->x[1]==6||x[2]==6,pA)\n \"两枚骰子点数不同的条件下,至少有一枚点数为6 的条件概率\"=>length(pB)//length(pA) #1//3\n```\n\n::: {.cell-output .cell-output-display execution_count=4}\n```\n\"两枚骰子点数不同的条件下,至少有一枚点数为6 的条件概率\" => 1//3\n```\n:::\n:::\n\n\n",
"markdown": "---\ntitle: \"afcp-ex3.1\"\n---\n\n### 1. question \n ex3.1 掷两枚均匀的骰子,求已知两枚骰子点数不同的条件下,至少有一枚点数为6 的条件概率。\n \n - 1. 首先构建出总的概率空间: 扔两枚骰子的组合\n - 2. 筛选出点数不同的组合作为子空间\n - 3. 在2子空间下筛选出至少有一个骰子为6 的组合\n - 4. 根据 2,3 计算条件概率\n\n### 2. total probablity space \n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\n ma=[[x,y] for x in 1:6, y in 1:6]|>d->reshape(d,(1,36))\n\n```\n\n::: {.cell-output .cell-output-display execution_count=27}\n```\n1×36 Matrix{Vector{Int64}}:\n [1, 1] [2, 1] [3, 1] [4, 1] [5, 1] … [3, 6] [4, 6] [5, 6] [6, 6]\n```\n:::\n:::\n\n\n### 3. according to condition to get sub probability space \n```julia\n#数组两个数不同\ncondition(x::Array)=x[1] !=x[2] \n```\n\n::: {.cell execution_count=2}\n``` {.julia .cell-code}\n condition(x::Array)=x[1] !=x[2]\n pA=filter(x->condition(x),vec(ma))\n show(pA)\n```\n\n::: {.cell-output .cell-output-stdout}\n```\n[[2, 1], [3, 1], [4, 1], [5, 1], [6, 1], [1, 2], [3, 2], [4, 2], [5, 2], [6, 2], [1, 3], [2, 3], [4, 3], [5, 3], [6, 3], [1, 4], [2, 4], [3, 4], [5, 4], [6, 4], [1, 5], [2, 5], [3, 5], [4, 5], [6, 5], [1, 6], [2, 6], [3, 6], [4, 6], [5, 6]]\n```\n:::\n:::\n\n\n```julia\n #数组中两个数有至少有一个等于 6\n x->x[1]==6||x[2]==6\n```\n### 4. conditional probablity\n\n::: {.cell execution_count=3}\n``` {.julia .cell-code}\n pB=filter(x->x[1]==6||x[2]==6,pA)\n \"两枚骰子点数不同的条件下,至少有一枚点数为6 的条件概率\"=>length(pB)//length(pA) #1//3\n```\n\n::: {.cell-output .cell-output-display execution_count=29}\n```\n\"两枚骰子点数不同的条件下,至少有一枚点数为6 的条件概率\" => 1//3\n```\n:::\n:::\n\n\n",
"supporting": [
"afcp-ex3.1_files/figure-html"
"afcp-ex3.1_files"
],
"filters": [],
"includes": {}
Expand Down
4 changes: 2 additions & 2 deletions _freeze/exercises/afcp-ex3.10/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"hash": "86b5e2228fde34ce045a7d3f89d3ef47",
"hash": "7622b26b07b98cfa374f572ba69081ec",
"result": {
"markdown": "---\ntitle: 1. question\n---\n\n\n```julia\n#= \n 从一副牌中抽出三张牌 已知条件是第二张和第三张都是黑桃,\n 求第一张是黑桃的概率\n 在实际打牌中, 三张牌可能属于不同的人,那么可以根第二个人和第三个人的牌来推算第一根得到某张牌的概率\n 因而第二张和第三张为黑桃,\n 所以第一张为黑桃的可能性是 11, 总的样本空间为 50\n\n 在条件下,第一张牌是黑桃的概率从 0.25降为 0.22\n\n=#\n```\n\n## 2. probability modify\n\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\n (\"unconditional\"=>13/52,\" conditional\"=>11/50)\n```\n\n::: {.cell-output .cell-output-display execution_count=5}\n```\n(\"unconditional\" => 0.25, \" conditional\" => 0.22)\n```\n:::\n:::\n\n\n",
"markdown": "---\ntitle: \"afcp-ex3.10\"\n---\n\n## 1. question \n```julia\n#= \n 从一副牌中抽出三张牌 已知条件是第二张和第三张都是黑桃,\n 求第一张是黑桃的概率\n 在实际打牌中, 三张牌可能属于不同的人,那么可以根第二个人和第三个人的牌来推算第一根得到某张牌的概率\n 因而第二张和第三张为黑桃,\n 所以第一张为黑桃的可能性是 11, 总的样本空间为 50\n\n 在条件下,第一张牌是黑桃的概率从 0.25降为 0.22\n\n=#\n```\n\n## 2. probability modify\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\n (\"unconditional\"=>13/52,\" conditional\"=>11/50)\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n(\"unconditional\" => 0.25, \" conditional\" => 0.22)\n```\n:::\n:::\n\n\n",
"supporting": [
"afcp-ex3.10_files/figure-html"
],
Expand Down
6 changes: 3 additions & 3 deletions _freeze/exercises/afcp-ex3.11/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"hash": "97a25fbd595de17202969e7fd9f9bb05",
"hash": "605f051241d79ae6ad40af070c60567e",
"result": {
"markdown": "---\ntitle: 1.从52 张牌抽出2 张的条件概率计算\n---\n\n\n\n### 2. 全概率路径图 @fig-1\n\n\n```{mermaid}\n%%| fig-width: 6.5\n%%| label: fig-1\n%%| fig-cap: \"A diagram of pick up two cards\"\n\nflowchart LR\n A(poker) ==s1:4/52 ==> B(\"A\")\n A(poker) == f1:48/52 ==>C(\"NotA\")\n \n B(\"A\") ==s2:3/51 ==> D(\"A\")\n B(\"A\") ==f2:48/51 ==> E(\"NotA\")\n \n C(\"NotA\") ==s3:4/51 ==> F(\"A\")\n C(\"NotA\") ==f3:47/51==> G(\"NotA\")\n\n style B fill: #9c0312, stroke: #333, stroke-width: 2px;\n style D fill: #9c0312, stroke: #333, stroke-width: 2px;\n style F fill: #9c0312, stroke: #333, stroke-width: 2px;\n\n```\n\n\n### 3. 已知一张为黑桃 A, 两张都是 A 的概率\n\n>由于有一张已经知道是 A, 另一张也为 A的概率就是:$s2=3/51$,这里与是否是黑桃无关,\n>因为这个信息没有参与到概率计算中\n\n### 4. 至少抽中一张 A的条件下,两张都是 A 的 概率\n\n至少有一张 A的全概率为:\n$$p_{total}=s_1*s_2+s_1*f_2+f_1*s_3 \\tag{1.1}$$\n\n两张都为 A的概率为:\n$$p_{doubleA}=s_1*s_2 \\tag{1.2}$$\n\n因此概率计算为:\n\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\ns1=4//52;s2=3//51;s3=4//51\ntotal=s1*s2+s1*(1-s2)+(1-s1)*s3\npda=s1*s2\n\n\"both_A\"=>pda//total\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n\"both_A\" => 1//33\n```\n:::\n:::\n\n\n",
"markdown": "---\ntitle: \"afcp-ex3.11\"\n---\n\n### 1.从52 张牌抽出2 张的条件概率计算\n\n### 2. 全概率路径图 @fig-1\n\n\n```{mermaid}\n%%| fig-width: 6.5\n%%| label: fig-1\n%%| fig-cap: \"A diagram of pick up two cards\"\n\nflowchart LR\n A(poker) ==s1:4/52 ==> B(\"A\")\n A(poker) == f1:48/52 ==>C(\"NotA\")\n \n B(\"A\") ==s2:3/51 ==> D(\"A\")\n B(\"A\") ==f2:48/51 ==> E(\"NotA\")\n \n C(\"NotA\") ==s3:4/51 ==> F(\"A\")\n C(\"NotA\") ==f3:47/51==> G(\"NotA\")\n\n style B fill: #9c0312, stroke: #333, stroke-width: 2px;\n style D fill: #9c0312, stroke: #333, stroke-width: 2px;\n style F fill: #9c0312, stroke: #333, stroke-width: 2px;\n\n```\n\n\n### 3. 已知一张为黑桃 A, 两张都是 A 的概率\n\n>由于有一张已经知道是 A, 另一张也为 A的概率就是:$s2=3/51$,这里与是否是黑桃无关,\n>因为这个信息没有参与到概率计算中\n\n### 4. 至少抽中一张 A的条件下,两张都是 A 的 概率\n\n至少有一张 A的全概率为:\n$$p_{total}=s_1*s_2+s_1*f_2+f_1*s_3 \\tag{1.1}$$\n\n两张都为 A的概率为:\n$$p_{doubleA}=s_1*s_2 \\tag{1.2}$$\n\n因此概率计算为:\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\ns1=4//52;s2=3//51;s3=4//51\ntotal=s1*s2+s1*(1-s2)+(1-s1)*s3\npda=s1*s2\n\n\"both_A\"=>pda//total\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n\"both_A\" => 1//33\n```\n:::\n:::\n\n\n",
"supporting": [
"afcp-ex3.11_files"
"afcp-ex3.11_files/figure-html"
],
"filters": [],
"includes": {}
Expand Down
6 changes: 3 additions & 3 deletions _freeze/exercises/afcp-ex3.12/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"hash": "66053fd2ce14ab67be8222217ae681da",
"hash": "a747bd8c098d3a4107a3927c1df06a96",
"result": {
"markdown": "---\ntitle: 精算师考试\n---\n\n\n> 获得精算师证书,需要连续通过三次考试\n\n### 考试的分层概率图\n\n根据描述, 绘出三次考试的分层概率图 @fig-1\n\n\n```{mermaid}\n%%| fig-width: 6.5\n%%| label: fig-1\n%%| fig-cap: \"A diagram of exam\"\n\n\nflowchart LR\n A(exame) ==s1:0.9 ==> B(success)\n A(exame) == f1:0.1 ==>C(failure)\n \n B(success) ==s2:0.8 ==> D(success)\n B(success) ==f2:0.2 ==> E(failure)\n \n D(success) ==s3:0.7 ==> F(success)\n D(success) ==f3:0.3==> G(failure)\n \n style B fill: #00FF00, stroke: #333, stroke-width: 4px;\n style D fill: #00FF00, stroke: #333, stroke-width: 4px;\n style F fill: #00FF00, stroke: #333, stroke-width: 4px;\n```\n\n\n### 通过三次考试,获得精算师证书的概率\n\n在 @fig-1 中,沿着绿色的路径就是三次考试成功的路径, 成功获得证书就是三次成功概率的乘积\n$$p_{succsss}=s1*s2*s3 \\tag{1.1}$$\n\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\n s1=0.9;s2=0.8;s3=0.7\n \"p_success\"=>s1*s2*s3\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n\"p_success\" => 0.504\n```\n:::\n:::\n\n\n### 在第二次考试中失败的概率\n如果没有通过考试, 那么在三次开始中都有可能失败,所以失败的条件下,需要重新计算总概率空间\n\n失败的全概率为:\n$$total=(f1+s1*f2+s1*s2*f3) \\tag{1.2}$$\n\n$f1$ 可以写为:\n$$f1=1-s1 \\tag{1.3}$$\n其他项以此类推,失败全概率为:\n\n::: {.cell execution_count=2}\n``` {.julia .cell-code}\ntotal=(1-s1)+(s1*(1-s2))+(s1*s2*(1-s3))\n\n\"total_failure\"=>total\n```\n\n::: {.cell-output .cell-output-display execution_count=3}\n```\n\"total_failure\" => 0.496\n```\n:::\n:::\n\n\n所以在第二次考试中失败的概率为:\n\n$$\\frac{(s1*f2)}{total} \\tag{1.4}$$\n\n::: {.cell execution_count=3}\n``` {.julia .cell-code}\n\"failure_at_second\"=>(s1*(1-s2))/total\n```\n\n::: {.cell-output .cell-output-display execution_count=4}\n```\n\"failure_at_second\" => 0.36290322580645157\n```\n:::\n:::\n\n\n",
"markdown": "---\ntitle: \"afcp-ex3.12\"\n---\n\n### 精算师考试\n> 获得精算师证书,需要连续通过三次考试\n\n### 考试的分层概率图\n\n根据描述, 绘出三次考试的分层概率图 @fig-1\n\n\n```{mermaid}\n%%| fig-width: 6.5\n%%| label: fig-1\n%%| fig-cap: \"A diagram of exam\"\n\n\nflowchart LR\n A(exame) ==s1:0.9 ==> B(success)\n A(exame) == f1:0.1 ==>C(failure)\n \n B(success) ==s2:0.8 ==> D(success)\n B(success) ==f2:0.2 ==> E(failure)\n \n D(success) ==s3:0.7 ==> F(success)\n D(success) ==f3:0.3==> G(failure)\n \n style B fill: #00FF00, stroke: #333, stroke-width: 4px;\n style D fill: #00FF00, stroke: #333, stroke-width: 4px;\n style F fill: #00FF00, stroke: #333, stroke-width: 4px;\n```\n\n\n### 通过三次考试,获得精算师证书的概率\n\n在 @fig-1 中,沿着绿色的路径就是三次考试成功的路径, 成功获得证书就是三次成功概率的乘积\n$$p_{succsss}=s1*s2*s3 \\tag{1.1}$$\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\n s1=0.9;s2=0.8;s3=0.7\n \"p_success\"=>s1*s2*s3\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n\"p_success\" => 0.504\n```\n:::\n:::\n\n\n### 在第二次考试中失败的概率\n如果没有通过考试, 那么在三次开始中都有可能失败,所以失败的条件下,需要重新计算总概率空间\n\n失败的全概率为:\n$$total=(f1+s1*f2+s1*s2*f3) \\tag{1.2}$$\n\n$f1$ 可以写为:\n$$f1=1-s1 \\tag{1.3}$$\n其他项以此类推,失败全概率为:\n\n::: {.cell execution_count=2}\n``` {.julia .cell-code}\ntotal=(1-s1)+(s1*(1-s2))+(s1*s2*(1-s3))\n\n\"total_failure\"=>total\n```\n\n::: {.cell-output .cell-output-display execution_count=3}\n```\n\"total_failure\" => 0.496\n```\n:::\n:::\n\n\n所以在第二次考试中失败的概率为:\n\n$$\\frac{(s1*f2)}{total} \\tag{1.4}$$\n\n::: {.cell execution_count=3}\n``` {.julia .cell-code}\n\"failure_at_second\"=>(s1*(1-s2))/total\n```\n\n::: {.cell-output .cell-output-display execution_count=4}\n```\n\"failure_at_second\" => 0.36290322580645157\n```\n:::\n:::\n\n\n",
"supporting": [
"afcp-ex3.12_files"
"afcp-ex3.12_files/figure-html"
],
"filters": [],
"includes": {}
Expand Down
6 changes: 3 additions & 3 deletions _freeze/exercises/afcp-ex3.14/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"hash": "451803ef5507d921e54fe76f5017ece4",
"hash": "8769c0cd02d5ca4cad92391699490fb3",
"result": {
"markdown": "---\ntitle: 1. question\n---\n\n\n> 坛子里最初有5个白球和7个黑球.每次取出一个球,记下它的颜色后放回坛子,同时再放人相同 颜色的2 个球.计算如下概率:\n>(a)前两个球是黑色的,后两个球是白色的\n>(b)前4个球中恰好有2个是黑色的。\n\n\n## 2. (a) \n\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\nw=5 #\nb=7\nt=w+b\nprob=(b//t)*((b+2)//(t+2))*(w//(t+2+2))*((w+2)//(t+2+2+2))\n```\n\n::: {.cell-output .cell-output-display execution_count=12}\n```\n35//768\n```\n:::\n:::\n\n\n1. $(b//t)$ 表示为从总数中抽取第一个黑球的概率\n2. $((b+2)//(t+2))$ 第二次抽取时黑球要增加 2, 总数也增加 2\n3. $(w//(t+2+2))$ 第三次抽取前,黑球数和总数再增加 2 $t+2+2$ \n4. $((w+2)//(t+2+2+2))$ 第四次抽取前, 总数和白球数再分别增加 2\n乘积就是(a) 描述的条件概率\n\n\n## 3. (b)\n\n::: {.cell execution_count=2}\n``` {.julia .cell-code}\nw=5\nb=7\nt=w+b\n\nbbww=(b//t)*((b+2)//(t+2))*(w//(t+2+2))*((w+2)//(t+2+2+2))\n\nbwbw=(b//t)*((w)//(t+2))*((b+2)//(t+2+2))*((w+2)//(t+2+2+2)) \n\nbwwb=(b//t)*((w)//(t+2))*((w+2)//(t+2+2))*((b+2)//(t+2+2+2))\n\nwwbb=(w//t)*((w+2)//(t+2))*(b//(t+2+2))*((b+2)//(t+2+2+2))\n\nwbwb= (w//t)*((b)//(t+2))*((w+2)//(t+2+2))*((b+2)//(t+2+2+2))\n\nwbbw=(w//t)*((b)//(t+2))*((b+2)//(t+2+2))*((w+2)//(t+2+2+2))\n\nprob=bbww+bwbw+bwwb+wwbb+wbwb+wbbw\n```\n\n::: {.cell-output .cell-output-display execution_count=13}\n```\n35//128\n```\n:::\n:::\n\n\n总是会取出两个白球和两个黑球\n无论那种顺序, 球的总数都是 $t+2+2+2$\n分子也是一样的, \n\n",
"markdown": "---\ntitle: \"afcp-ex3.14\"\n---\n\n## 1. question\n> 坛子里最初有5个白球和7个黑球.每次取出一个球,记下它的颜色后放回坛子,同时再放人相同 颜色的2 个球.计算如下概率:\n>(a)前两个球是黑色的,后两个球是白色的\n>(b)前4个球中恰好有2个是黑色的。\n\n\n## 2. (a) \n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\nw=5 #\nb=7\nt=w+b\nprob=(b//t)*((b+2)//(t+2))*(w//(t+2+2))*((w+2)//(t+2+2+2))\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n35//768\n```\n:::\n:::\n\n\n1. $(b//t)$ 表示为从总数中抽取第一个黑球的概率\n2. $((b+2)//(t+2))$ 第二次抽取时黑球要增加 2, 总数也增加 2\n3. $(w//(t+2+2))$ 第三次抽取前,黑球数和总数再增加 2 $t+2+2$ \n4. $((w+2)//(t+2+2+2))$ 第四次抽取前, 总数和白球数再分别增加 2\n乘积就是(a) 描述的条件概率\n\n\n## 3. (b)\n\n::: {.cell execution_count=2}\n``` {.julia .cell-code}\nw=5\nb=7\nt=w+b\n\nbbww=(b//t)*((b+2)//(t+2))*(w//(t+2+2))*((w+2)//(t+2+2+2))\n\nbwbw=(b//t)*((w)//(t+2))*((b+2)//(t+2+2))*((w+2)//(t+2+2+2)) \n\nbwwb=(b//t)*((w)//(t+2))*((w+2)//(t+2+2))*((b+2)//(t+2+2+2))\n\nwwbb=(w//t)*((w+2)//(t+2))*(b//(t+2+2))*((b+2)//(t+2+2+2))\n\nwbwb= (w//t)*((b)//(t+2))*((w+2)//(t+2+2))*((b+2)//(t+2+2+2))\n\nwbbw=(w//t)*((b)//(t+2))*((b+2)//(t+2+2))*((w+2)//(t+2+2+2))\n\nprob=bbww+bwbw+bwwb+wwbb+wbwb+wbbw\n```\n\n::: {.cell-output .cell-output-display execution_count=3}\n```\n35//128\n```\n:::\n:::\n\n\n总是会取出两个白球和两个黑球\n无论那种顺序, 球的总数都是 $t+2+2+2$\n分子也是一样的, \n\n",
"supporting": [
"afcp-ex3.14_files/figure-html"
"afcp-ex3.14_files"
],
"filters": [],
"includes": {}
Expand Down
6 changes: 3 additions & 3 deletions _freeze/exercises/afcp-ex3.16/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"hash": "f87d0e99b34192fdb87928a1a1323be8",
"hash": "a41080f855b67ad1234fdfaef2a5ecf3",
"result": {
"markdown": "---\ntitle: 1. question\n---\n\n\n>98%的婴儿分娩是安全的.然而有15% 的分娩是剖腹产. 当采用剖腹产时,婴儿的生存概率为 9 6 %. 如 果 随 机 选 择 一 个 采 用 非 剖 腹 产 的 孕妇 , 那 么 其 婴 儿 的 生 存 概 率 是 多 少?\n\n### 2. 全概率图为 @fig-1\n\n\n```{mermaid}\n%%| fig-width: 6.5\n%%| label: fig-1\n%%| fig-cap: \"A baby success\"\n\n flowchart LR\n A(P)==自然分娩==>B(85%)\n A(P)==剖腹产==>C(15%)\n\n B(85%)==生存==>D(PA)\n B(85%)==夭折==>E(1-PA)\n\n C(15%)==生存==>F(96%)\n C(15%)==夭折==>G(4%)\n```\n\n\n### 3. 分娩成功全概率表示为:\n\n$$(0.85*PA)+(0.15*0.96)=0.98 \\tag{1.1}$$\n\n 可以变换为:\n\n$$PA=\\frac{0.98-(0.15*0.96)}{0.85} \\tag{1.2}$$\n\n### 4. 计算\n\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\nPA=(0.98-(0.15*0.96))/0.85\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n0.9835294117647059\n```\n:::\n:::\n\n\n",
"markdown": "---\ntitle: \"afcp-ex3.16\"\n---\n\n## 1. question \n>98%的婴儿分娩是安全的.然而有15% 的分娩是剖腹产. 当采用剖腹产时,婴儿的生存概率为 9 6 %. 如 果 随 机 选 择 一 个 采 用 非 剖 腹 产 的 孕妇 , 那 么 其 婴 儿 的 生 存 概 率 是 多 少?\n\n### 2. 全概率图为 @fig-1\n\n\n```{mermaid}\n%%| fig-width: 6.5\n%%| label: fig-1\n%%| fig-cap: \"A baby success\"\n\n flowchart LR\n A(P)==自然分娩==>B(85%)\n A(P)==剖腹产==>C(15%)\n\n B(85%)==生存==>D(PA)\n B(85%)==夭折==>E(1-PA)\n\n C(15%)==生存==>F(96%)\n C(15%)==夭折==>G(4%)\n```\n\n\n### 3. 分娩成功全概率表示为:\n\n$$(0.85*PA)+(0.15*0.96)=0.98 \\tag{1.1}$$\n\n 可以变换为:\n\n$$PA=\\frac{0.98-(0.15*0.96)}{0.85} \\tag{1.2}$$\n\n### 4. 计算\n\n::: {.cell execution_count=1}\n``` {.julia .cell-code}\nPA=(0.98-(0.15*0.96))/0.85\n```\n\n::: {.cell-output .cell-output-display execution_count=2}\n```\n0.9835294117647059\n```\n:::\n:::\n\n\n",
"supporting": [
"afcp-ex3.16_files"
"afcp-ex3.16_files/figure-html"
],
"filters": [],
"includes": {}
Expand Down
Loading

0 comments on commit 05f7df0

Please sign in to comment.