diff --git a/notebook_必备数学基础/假设检验章节/assets/20201114095426.png b/notebook_必备数学基础/假设检验章节/assets/20201114095426.png
new file mode 100644
index 0000000..fb3de64
Binary files /dev/null and b/notebook_必备数学基础/假设检验章节/assets/20201114095426.png differ
diff --git a/notebook_必备数学基础/假设检验章节/assets/20201114100216.png b/notebook_必备数学基础/假设检验章节/assets/20201114100216.png
new file mode 100644
index 0000000..1cc7963
Binary files /dev/null and b/notebook_必备数学基础/假设检验章节/assets/20201114100216.png differ
diff --git a/notebook_必备数学基础/假设检验章节/假设检验.ipynb b/notebook_必备数学基础/假设检验章节/假设检验.ipynb
index 39081bc..5781fc7 100644
--- a/notebook_必备数学基础/假设检验章节/假设检验.ipynb
+++ b/notebook_必备数学基础/假设检验章节/假设检验.ipynb
@@ -4,7 +4,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 假设检验:\n",
+ "## 假设检验的基本思想"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 假设检验\n",
"
\n",
" - 什么是假设:对总体参数(均值,比例等)的具体数值所作的陈述。比如,我认为新的配方的药效要比原来的更好。\n",
"
- 什么是假设检验:先难总体的参数提出某种假设,然后利用样本的信息判断假设是否成立的过程。比如,上面的假设我是要接受还是拒绝呢\n",
@@ -15,7 +22,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 假设校验的应用:\n",
+ "### 假设校验的应用\n",
"
\n",
" - 推广新的教育方案后,教学效果是否有所\n",
"
- 提高醉驾判定为刑事犯罪后是否会使得交通事故减少\n",
@@ -26,7 +33,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 假设校验的基本思想\n",
+ "### 假设校验的基本思想\n",
""
]
},
@@ -41,7 +48,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 显著性水平\n",
+ "### 显著性水平\n",
"
\n",
"- 一个概率值,原假设为真时,拒绝原假设的概率,\n",
"表示为 alpha常用取值为0.01,0.05,0.10。\n",
@@ -56,7 +63,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 假设检验的步骤\n",
+ "### 假设检验的步骤\n",
"
\n",
" - 提出假设\n",
"
- 确定适当的检验统计量。如方差验证、卡方验证等\n",
@@ -69,7 +76,14 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 原假设与备择建设\n",
+ "## 左右侧检验与双侧检验"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 原假设与备择建设\n",
"
\n",
" - 待检验的假设又叫原假设,也可以叫零假设,表示为HO。(零假设其实就是表示原假设一般都是说没有差异,没有改变。。。)\n",
"
- 与原假设对比的假设叫做备择假设,表示为H1\n",
@@ -80,18 +94,100 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## 检验统计量计算检验的统计量\n",
+ "### 检验统计量计算检验的统计量\n",
"
\n",
" - 计算检验的统计量\n",
- "
- 根据给定的显著性水平,查表得出相应的临界值"
+ "
- 根据给定的显著性水平,查表得出相应的临界值\n",
+ "
- 将检验统计量的值与显著性水平的临界值进行比较\n",
+ "
- 得出拒绝或不拒绝原假设的结论"
]
},
{
- "cell_type": "code",
- "execution_count": null,
+ "cell_type": "markdown",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "### 检验中常说的小概率\n",
+ "
\n",
+ "- 在一次试验中,一个几乎不可能发生的事件发生的概率\n",
+ "
- 在一次试验中,小概率事件一旦发生,我们就有理由拒绝原假设\n",
+ "
- 小概率由我们事先确定,也就是多少的概率我们就拒绝原假设"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### P值\n",
+ "
\n",
+ " - 是一个概率值\n",
+ "
- 如果原假设为真,P-值是抽样分布中大于或小于样本统计量的概率\n",
+ "
- 左侧检验时,P-值为曲线上方小于等于检验统计量部分的面积\n",
+ "
- 右侧检验时,P-值为曲线上方大于等于检验统计量部分的面积"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 左侧检验与右侧检验\n",
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 什么时候用左侧检验什么时候用右侧检验\n",
+ "
\n",
+ "- 当关键词有不得少于/低于的时候用左侧,比如灯泡的使用寿命不得少于/低于700小时\n",
+ "
- 当关键词有不得多于/高于的时候用右侧,比如次品率不得多于/高于5%"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "
\n",
+ " - 单侧检验指按分布的一侧计算显著性水平概率的检验。用于检验大于、小于、高于、低于、优于、劣于等有确定性大小关系的假设检验问题。这类问题的确定是有一定的理论依据的。假设检验写作:μ1<μ2或μ1>μ2。\n",
+ "
- 双侧检验指按分布两端计算显著性水平概率的检验,应用于理论上不能确定两个总体一个一定比另一个大或小的假设检验。般假设检验写作H1: μ1≠μ2"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "一例如,某种零件的尺寸,要求其平均长度为10cm,大于或小于10cm均属于不合格我们想要证明(检验)大于或小于这两种可能性中的任何一种是否成立建立的原假设与备择假设应为:\n",
+ "
\n",
+ "H0:μ = 10; H1: μ≠10"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "### 检验结果\n",
+ "单侧检验\n",
+ "\n",
+ " - 若p值 > α,不拒绝H0\n",
+ "
- 若p值 < α,拒绝H0"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "双侧检验\n",
+ "
\n",
+ " - 若p值 > α/2,bu'j'j\n",
+ "
- "
+ ]
}
],
"metadata": {
diff --git a/必备数学基础.md b/必备数学基础.md
index 128ffd7..81dec5c 100644
--- a/必备数学基础.md
+++ b/必备数学基础.md
@@ -1195,3 +1195,5 @@ https://scikit-learn.org/stable/auto_examples/
**假设检验的基本思想**
+**左右侧检验与双侧检验**
+