当前位置:网站首页>参数估计与假设校验----MATLAB
参数估计与假设校验----MATLAB
2022-04-22 17:09:00 【小宇2022】
%--------------------------------------------------------------------------
% 第18章 参数估计与假设检验
%--------------------------------------------------------------------------
%% examp18.2-1
%+++++++++++++++++++++++++调用normfit函数求解+++++++++++++++++++++++++++++++
x = [15.14 14.81 15.11 15.26 15.08 15.17 15.12 14.95 15.05 14.87];
[muhat,sigmahat,muci,sigmaci] = normfit(x,0.1)
%++++++++++++++++++++++++++++调用mle函数求解++++++++++++++++++++++++++++++++
x = [15.14 14.81 15.11 15.26 15.08 15.17 15.12 14.95 15.05 14.87];
[mu_sigma,mu_sigma_ci] = mle(x,'distribution','norm','alpha',0.1)
%% examp18.2-2
x = [0.7917,0.8448,0.9802,0.8481,0.7627
0.9013,0.9037,0.7399,0.7843,0.8424
0.9842,0.7134,0.9959,0.6444,0.8362
0.7651,0.9341,0.6515,0.7956,0.8733];
PdfFun = @(x,theta) theta*x.^(theta-1).*(x>0 & x<1);
[phat,pci] = mle(x(:),'pdf',PdfFun,'start',1)
%% examp18.3-1
%++++++++++++++++++++++++++++++++双侧检验++++++++++++++++++++++++++++++++++
x = [97 102 105 112 99 103 102 94 100 95 105 98 102 100 103];
[h,p,muci,zval] = ztest(x,100,2,0.05)
%++++++++++++++++++++++++++++++++单侧检验++++++++++++++++++++++++++++++++++
x = [97 102 105 112 99 103 102 94 100 95 105 98 102 100 103];
[h,p,muci,zval] = ztest(x,100,2,0.05,'right')
%% examp18.3-2
x = [49.4 50.5 50.7 51.7 49.8 47.9 49.2 51.4 48.9];
[h,p,muci,stats] = ttest(x,50,0.05)
%% examp18.3-3
x = [20.1, 20.0, 19.3, 20.6, 20.2, 19.9, 20.0, 19.9, 19.1, 19.9];
y = [18.6, 19.1, 20.0, 20.0, 20.0, 19.7, 19.9, 19.6, 20.2];
alpha = 0.05;
tail = 'both';
vartype = 'equal';
[h,p,muci,stats] = ttest2(x,y,alpha,tail,vartype)
%% examp18.3-4
x = [49.4 50.5 50.7 51.7 49.8 47.9 49.2 51.4 48.9];
var0 = 1.5;
alpha = 0.05;
tail = 'both';
[h,p,varci,stats] = vartest(x,var0,alpha,tail)
%% examp18.3-5
x = [20.1, 20.0, 19.3, 20.6, 20.2, 19.9, 20.0, 19.9, 19.1, 19.9];
y = [18.6, 19.1, 20.0, 20.0, 20.0, 19.7, 19.9, 19.6, 20.2];
alpha = 0.05;
tail = 'both';
[h,p,varci,stats] = vartest2(x,y,alpha,tail)```
```css
muhat =
15.0560
sigmahat =
0.1397
muci =
14.9750
15.1370
sigmaci =
0.1019
0.2298
mu_sigma =
15.0560 0.1325
mu_sigma_ci =
14.9750 0.1019
15.1370 0.2298
phat =
5.1502
pci =
2.8931
7.4073
h =
1
p =
0.0282
muci =
100.1212 102.1455
zval =
2.1947
h =
1
p =
0.0141
muci =
100.2839 Inf
zval =
2.1947
h =
0
p =
0.8961
muci =
48.9943 50.8945
stats =
包含以下字段的 struct:
tstat: -0.1348
df: 8
sd: 1.2360
h =
0
p =
0.3191
muci =
-0.2346 0.6791
stats =
包含以下字段的 struct:
tstat: 1.0263
df: 17
sd: 0.4713
h =
0
p =
0.8383
varci =
0.6970 5.6072
stats =
包含以下字段的 struct:
chisqstat: 8.1481
df: 8
h =
0
p =
0.5798
varci =
0.1567 2.8001
stats =
包含以下字段的 struct:
fstat: 0.6826
df1: 9
df2: 8
版权声明
本文为[小宇2022]所创,转载请带上原文链接,感谢
https://blog.csdn.net/m0_38127487/article/details/124337270
边栏推荐
- Practice questions and answers of evaluation technical methods in 2022 environmental impact assessment engineer examination
- Sqlalchemy过滤时间
- [Dahua cloud native] wonderful relationship between message queue and express cabinet (with video)
- 电商价格数据监测接口/品牌商品控价接口/商品数据分析接口/比价搜索API接口,超详细的接口对接说明
- Add release configuration in clion
- Will Liu is a tiktok bit.
- Check whether the paper is retrieved by SCI
- ES6 对象扩展 链判断运算符 和 Null判断运算符
- GlobalMapper20 如何批量把dwg文件转换为dxf文件,效率神器
- 写LeetCode发现的一些神奇语句
猜你喜欢

Network wide solicitation! Tell me the story between you and Yida

SDN学习之Opendaylight浅析(二)

openstack利用devstack安装,安装之后dashboard报错Internal Server Error

SDN学习之Opendaylight浅析(一)

OJ daily practice -- find the sum of score sequences

Cvpr2019 domain adaptation / semantic segmentation: adapting structural information across domains for boosting SEMA

引爆最多的炸弹-c语言dfs递归做法

Design from 0_ Rc522 read / write card based on stm32f1

Jiaoxia is following the old path of perfect diary

Globalmapper20 how to convert DWG files into DXF files in batches, efficiency artifact
随机推荐
list转map 及Duplicate key.md
leetcode:23. 合并K个升序链表
How does glboalmapper20 convert hundreds of longitude and latitude projected images into national 2000 or other projected images at one time
[unity] combat system learning 12: switchable
Detonate the most bombs - C language DFS recursive approach
MySQL笔记(基础篇)
面向全球市场,PlatoFarm今日登录HUOBI等全球四大平台
MySQL_ 00_ Get to know MySQL
云服务器该如何选择
ASP. Net core to realize JWT authorization and authentication (2. Practical part)
阿里云日志服务sls的典型应用场景
二分法的介绍和拓展
Shiro缓存管理
20220421 hardware imaging
Notes on deep learning (I) -- loss function
webrtc入门:4.RTCPeerConnection连接音视频流
2022年环境影响评价工程师考试案例分析练习题及答案
Kubernetes详解(七)——Service对象部署和应用
混合背包呀
leetcode:451. 根据字符出现频率排序