当前位置:网站首页>32 Basic Statistics - Hypothesis Testing
32 Basic Statistics - Hypothesis Testing
2022-08-09 03:29:00 【paper limit】
1.假设检验的一般步骤
(1)提出零假设(Ho).
根据检验的目标,对需要检验的最终结果提出一个零假设.
(2)选择检验统计量.
假设检验中,总是通过计算检验统计量的概率值进行判断,这些统计量服从或近似服从已知的某种分布,常用的有t分布、F分布等.
(3)计算检验统计量观测值发生的概率.
在认为零假设成立的前提下,计算检验统计量观测值发生的概率,记为p,概率p值就是在零假设成立的前提下样本值发生的概率,对此可以根据一定的标准来判定其发生的概率是否是小概率.
(4)给定显著性水平,做出判断.
The significance level refers to the probability that the null hypothesis is true but falsely rejected,一般取0.01或0.05,即零假设正确且正确接受的概率为99%或95%,换言之,概率p值小于显著性水平时,则拒绝零假设,At this point, the probability that the null hypothesis is correct but falsely rejected is less than the significance level,That is, less than a predetermined level,That is to say, the probability that the null hypothesis is correct but falsely rejected is within our tolerance range,It is considered correct to reject the null hypothesis;反之,概率p值大于显著性水平时,则接受零假设.
2.两种T检验
单一样本的T检验 :检验单个变量的均值是否与给定的常数之间存在差异.
①提出假设:
H 0 : μ = μ 0 , H 1 ≠ μ 0 H_0:\mu =\mu _0, H_1\ne \mu _0 H0:μ=μ0,H1=μ0
②确定检验统计量:
a.If the population variance is known, a standard normal distribution can be constructed at this timeZ检验统计量:
Z = X ˉ − μ σ / n N ( 0, 1 ) Z=\frac{\bar{X}-\mu}{\sigma /\sqrt{n}}~N\left( \text{0,}1 \right) Z=σ/nXˉ−μ N(0,1)
b.If the population variance is unknown,The population variance is then replaced by the sample variance,采用t分布构造t检验统计量:
t = X ˉ − μ S / n t ( n − 1 ) t=\frac{\bar{X}-\mu}{S/\sqrt{n}}~t\left( n-1 \right) t=S/nXˉ−μ t(n−1)
其中,S为样本标准差, S = 1 n − 1 ∑ i = 1 n ( X i − X ˉ ) 2 S=\sqrt{\frac{1}{n-1}\sum_{i=1}^n{\left( X_i-\bar{X} \right) ^2}} S=n−11∑i=1n(Xi−Xˉ)2
while the standard error: S x ˉ = X n S_{\bar{x}}=\frac{X}{\sqrt{n}} Sxˉ=nX
③做出统计推断独立样本的T检验:检验两组不相关的样本是否来自具有相同均值的总体(均值是否相同,如男女的平均收入是否相同,是否有显著性差异)配对T检验:检验两组相关的样本是否来自具有相同均值的总体(前后比较,如训练效果,治疗效果)If the analysis variable is clearly non-normally distributed,A nonparametric test procedure should be chosen
①提出假设:
H 0 : μ = μ 2 , H 1 ≠ μ 2 H_0:\mu =\mu _2, H_1\ne \mu _2 H0:μ=μ2,H1=μ2
②确定检验统计量:
**a.**If the population variance is known,A standard normal distribution can be constructedZ检验统计量
Z = ( X ˉ 1 − X ˉ 2 ) − ( μ 1 − μ 2 ) σ 1 2 / n 1 + σ 2 2 / n 2 N ( 0, 1 ) Z=\frac{\left( \bar{X}_1-\bar{X}_2 \right) -\left( \mu _1-\mu _2 \right)}{\sqrt{\sigma _1^2/n_1+\sigma _2^2/n_2}}~N\left( \text{0,}1 \right) Z=σ12/n1+σ22/n2(Xˉ1−Xˉ2)−(μ1−μ2) N(0,1)
**b.**When the population variance is unknown,可以构造t检验统计量,而当 ω 1 2 = ω 2 2 {\omega}_1^2={\omega}_2^2 ω12=ω22,构造出来的t检验统计量为:
t = ( X ˉ 1 − X ˉ 2 ) − ( μ 1 − μ 2 ) S ω 2 / n 1 + S ω 2 / n 2 t ( n 1 + n 2 − 2 ) t=\frac{\left( \bar{X}_1-\bar{X}_2 \right) -\left( \mu _1-\mu _2 \right)}{\sqrt{S_{\omega}^{2}/n_1+S_{\omega}^{2}/n_2}}~t\left( n_1+n_2-2 \right) t=Sω2/n1+Sω2/n2(Xˉ1−Xˉ2)−(μ1−μ2) t(n1+n2−2)
式子中的 S ω 2 S_{\omega}^2 Sω2有:
S ω 2 = ( n 1 − 1 ) S 1 2 + ( n 2 − 1 ) S 2 2 n 1 + n 2 − 2 S_{\omega}^{2}=\frac{\left(n_{1}-1\right) S_{1}^{2}+\left(n_{2}-1\right) S_{2}^{2}}{n_{1}+n_{2}-2} Sω2=n1+n2−2(n1−1)S12+(n2−1)S22
而 S 1 2 S_1^2 S12、 S 2 2 S_2^2 S22are the standard deviation of the sample size.
**c.**当 ω 1 2 ≠ ω 2 2 {\omega}_1^2 \ne {\omega}_2^2 ω12=ω22的时候,构造出来的t检验统计量为:
t = ( X ˉ 1 − X ˉ 2 ) − ( μ 1 − μ 2 ) S 2 2 / n 1 + S 2 2 / n 2 t=\frac{\left( \bar{X}_1-\bar{X}_2 \right) -\left( \mu _1-\mu _2 \right)}{\sqrt{S_{2}^{2}/n_1+S_{2}^{2}/n_2}} t=S22/n1+S22/n2(Xˉ1−Xˉ2)−(μ1−μ2)
Its corrected degrees of freedom are :
d f = ( S 1 2 n 1 + S 2 2 n 2 ) 2 ( S 1 2 n 1 ) 2 n 1 − 1 + ( S 2 2 n 2 ) 2 n 2 − 1 d f=\frac{\left(\frac{S_{1}^{2}}{n_{1}}+\frac{S_{2}^{2}}{n_{2}}\right)^{2}}{\frac{\left(\frac{S_{1}^{2}}{n_{1}}\right)^{2}}{n_{1}-1}+\frac{\left(\frac{S_{2}^{2}}{n_{2}}\right)^{2}}{n_{2}-1}} df=n1−1(n1S12)2+n2−1(n2S22)2(n1S12+n2S22)2
- Steps to test the homogeneity of variances
**注意:**If the variances of the two populations are equal,It satisfies the homogeneity of variances.所以,To construct a test statistic when the variance is unknown, the homogeneity of variance test must be performed first.(SPSS中利用Levene FThe homogeneity of variance test method tests whether the variances of two independent populations are significantly different.)
①提出假设:
H 0 : σ 1 2 = σ 2 2 , H 1 : σ 1 2 ≠ σ 2 2 H_0:\sigma _{1}^{2}=\sigma _{2}^{2},H_1:\sigma _{1}^{2}\ne \sigma _{2}^{2} H0:σ12=σ22,H1:σ12=σ22
②确定检验统计量:采用F检验统计量.
F = S 1 2 σ 1 2 S 2 2 σ 2 2 F ( n 1 − 1, n 2 − 1 ) F=\frac{\frac{S_{1}^{2}}{\sigma _{1}^{2}}}{\frac{S_{2}^{2}}{\sigma _{2}^{2}}}~F\left( n_1-\text{1,}n_2-1 \right) F=σ22S22σ12S12 F(n1−1,n2−1)
拒绝域:
( 0, F 1 − α 2 ) , ( F α 2 , + ∞ ) \left( \text{0,}F_{1-\frac{\alpha}{2}} \right) ,\left( F_{\frac{\alpha}{2}},+\infty \right) (0,F1−2α),(F2α,+∞)
边栏推荐
- 06 动态内存
- 引用类型的浅拷贝与深拷贝小记
- Embedded system driver advanced [3] - __ID matching and device tree matching under platform bus driver development
- DSPE-PEG-OH,DSPE-PEG-Hydroxyl,磷脂-聚乙二醇-羟基仅供科研实验使用
- Exchange VLAN experiment
- Linux安装MySQL8
- 01| Data Type
- 23 Lectures on Disassembly of Multi-merchant Mall System Functions-Platform Distribution Level
- What are the functions and applications of the smart counter control board?
- leetcode 5709. 最大升序子数组和
猜你喜欢
宝塔实测-在线药店商城源码带WAP版
【机器学习】21天挑战赛学习笔记(三)
新型双功能螯合剂NOTA及其衍生物CAS号:147597-66-8p-SCN-Bn-NOTA
A separate machine is connected to the spark cluster of cdh, and the task is submitted remotely (absolutely successful, I have tested it n times)
The condition variable condition_variable implements thread synchronization
PhotoShop软件笔记
笔记本重装系统如何找回之前自己自带的office
卷积神经网络的推导过程
Mysql表打不开
30 范数
随机推荐
下秒数据CEO蔡致暖受邀参加联合数据举办《数据要素加速跑》线上沙龙
数组与切片
Win10开始菜单打不开怎么办?
数据库工具DataGrip V2022.2正式发布——支持导入多个 CSV 文件的选项
leetcode 5705. 判断国际象棋棋盘中一个格子的颜色
最优化方法——0.618法matlab实现
剑指 Offer 56 - I. 数组中数字出现的次数
qt字符串之 QString详解
别了,IE浏览器
创建一个DAPP的全流程
【机器学习】21天挑战赛学习笔记(三)
卷积神经网络的推导过程
Deep learning - in the recognition, for example, this paper discusses how to preserve the neural network model
Redis的过期策略和淘汰策略
EventLoop同步异步,宏任务微任务笔记
以赛促练-力扣第84场双周赛反思以及第305场周赛补题
宝塔实测-在线药店商城源码带WAP版
Leetcode Brushing Questions - 148. Sort Linked List
Chapter3 numpy创建数组
2022微服务面试题 最新50道题(含答案解析)