统计推断
- 统计推断:点估计,假设检验分析
- 假设检验分析分为:参数估计和非参数估计
- 假设检验量,假设其为真,
- 弃真错误与取为错误
- 显著性检验,控制错误发生的概率,p{去真,取伪}<alpha
以下为matlab代码
%%
% 糖果包装机的样本为[0.49,0.506,0.518,0.524,0.498,0.511,0.520,0.515]
% 标准为0.5 ,标准差差为0.015
% 求其工作状态是否正常
%显著性水平:alhp=0.05
clear
clc
close all
package_weight=[0.49,0.506,0.518,0.524,0.498,0.511,0.520,0.515];
x_bar=sum(package_weight)/length(package_weight);
y=(x_bar-0.5)*(9^0.5)/0.015 %服从标准正泰分布
z=norminv(1-0.025,0,1)
%求0.05的上alpha分位点
p=y<=z %输出为false
%结论包装机不正常