当前位置:网站首页>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α,+∞)
边栏推荐
猜你喜欢
i18n 国际化
The condition variable condition_variable implements thread synchronization
leetcode 5705. 判断国际象棋棋盘中一个格子的颜色
理性预测,未来音视频开发前景将是这般光景
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)
What are the functions and applications of the smart counter control board?
C18-PEG- ALD批发_C18-PEG-CHO_C18-PEG-醛基
卷积神经网络的推导过程
01| 数据类型
权限系统就该这么设计(万能通用),稳的一批!
随机推荐
Celery进阶_任务优先级分配
从暴力递归到动态规划leetcode第62题:不同路径
30 范数
新型双功能螯合剂NOTA及其衍生物CAS号:147597-66-8p-SCN-Bn-NOTA
Matlab optimization method -- 0.618 method
手把手教你uniapp接入聊天IM即时通讯功能-源码分享
佛性问题排查小结
QQ浏览器 replaceAll方法 is not a function 问题解决方法
项目中'说到做不到'的个人分析
5823. 字符串转化后的各位数字之和
那些关于DOM的常见Hook封装(一)
浅聊一下那些营销工具—优惠券
Promoting practice with competitions-Like the 84th biweekly game reflection and the 305th weekly game supplementary questions
01| 数据类型
wift3.0设置导航栏,标题,字体,item颜色和字体大小
Chapter3 numpy创建数组
Cyanine5tetrazine(CAS号:1427705-31-4)结构式原理
pytorch 自定义dataset
网路编程_socket返回值
xml reference configuration file