⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test1n.m

📁 一个非常实用的统计工具箱
💻 M
字号:
function [pval, cimean, cisigma] = test1n(x,cl)%TEST1N   Tests and confidence intervals based on a normal sample%         %         [pval, cimean, cisigma] = test1n(x,CL)%         %         Input CL is confidence level for the confidence intervals,%         with default 0.95. Output pval is the probability that the %	  mean of x is as far from 0 as it is, or further away, cimean  %	  and cisigma are confidence intervals for the mean and for the %	  standard deviation respectively. These are of the form %	  [LeftLimit, PointEstimate, RightLimit].%%	  See also TEST1R and TEST1C.%       Anders Holtsberg, 01-11-95%       Copyright (c) Anders Holtsbergx = x(:);if nargin<2, cl = 0.95; endn = length(x);m = mean(x);s = sqrt(var(x));T = m/s*sqrt(n);pval = (1-pt(abs(T),n-1))*2;t = qt(1-(1-cl)/2,n-1);cimean = [m-t*s/sqrt(n), m, m+t*s/sqrt(n)];cisigma = s*[sqrt((n-1)/qchisq(1-(1-cl)/2,n-1)), 1,...              sqrt((n-1)/qchisq((1-cl)/2,n-1))];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -