当前位置:网站首页>Parameter estimation and hypothesis verification - matlab
Parameter estimation and hypothesis verification - matlab
2022-04-22 17:17:00 【Xiaoyu 2022】
%--------------------------------------------------------------------------
% The first 18 Chapter Parameter estimation and hypothesis testing
%--------------------------------------------------------------------------
%% examp18.2-1
%+++++++++++++++++++++++++ call normfit Function solving +++++++++++++++++++++++++++++++
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)
%++++++++++++++++++++++++++++ call mle Function solving ++++++++++++++++++++++++++++++++
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
%++++++++++++++++++++++++++++++++ Bilateral test ++++++++++++++++++++++++++++++++++
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)
%++++++++++++++++++++++++++++++++ One side test ++++++++++++++++++++++++++++++++++
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 =
That contains the following fields struct:
tstat: -0.1348
df: 8
sd: 1.2360
h =
0
p =
0.3191
muci =
-0.2346 0.6791
stats =
That contains the following fields struct:
tstat: 1.0263
df: 17
sd: 0.4713
h =
0
p =
0.8383
varci =
0.6970 5.6072
stats =
That contains the following fields struct:
chisqstat: 8.1481
df: 8
h =
0
p =
0.5798
varci =
0.1567 2.8001
stats =
That contains the following fields struct:
fstat: 0.6826
df1: 9
df2: 8
版权声明
本文为[Xiaoyu 2022]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221708530606.html
边栏推荐
- 20220420 reasoning framework analyzes what is gradient
- Sqlalchemy filter time
- Apache配置多端口
- Shiro cache management
- 阿里云日志服务sls的典型应用场景
- Using IP addr to operate the IP of network card
- 对数器的概念和使用
- Vscode most complete practical plug-in (VIP collection version)
- Comment intégrer les applets et construire la GI pour réaliser le chat de messagerie instantanée
- 2022年环境影响评价工程师考试案例分析练习题及答案
猜你喜欢

leetcode:23. 合并K个升序链表

Redis(16) -- Redis集群

OJ每日一练——求分数序列之和

Jupyter notebook内使用(添加)虚拟环境
![[Golang]力扣Leetcode - 657. 机器人能否返回原点(模拟)](/img/b1/035c907253739a3e8c68b5934fd4e0.png)
[Golang]力扣Leetcode - 657. 机器人能否返回原点(模拟)

Respectful and modest

Detailed explanation of kubernetes (VII) -- service object deployment and Application

leetcode:451. Sort by character frequency

2022年环境影响评价工程师考试案例分析练习题及答案

2022 EIA Engineer Examination case analysis exercises and answers
随机推荐
MySQL配置sql_mode
Introduction to webrtc: 4 Rtcpeerconnection connects audio and video streams
2022年环境影响评价工程师考试技术导则与标准练习题及答案
Resume WiFi operation
LeetCode刷题计划——单调数列
数组对象去重 及 数组对象中找对应对象数据
7 interview questions about closure
Test life | less than 2 years after graduation, 0 experience and won the 30W annual salary of a well-known Internet enterprise. How did he do it?
Check whether the paper is retrieved by SCI
云服务器该如何选择
list转map 及Duplicate key.md
leetcode:451. Sort by character frequency
leetcode:451. 根据字符出现频率排序
15 ContentProvider
leetcode:23. 合并K个升序链表
Exercises and answers of relevant laws and regulations in 2022 environmental impact assessment engineer examination
电商价格数据监测接口/品牌商品控价接口/商品数据分析接口/比价搜索API接口,超详细的接口对接说明
Hybrid Backpack
混合背包呀
Kubernetes详解(七)——Service对象部署和应用