永发信息网

MATLAB F检验

答案:3  悬赏:70  手机版
解决时间 2021-02-12 11:55
  • 提问者网友:姑娘长的好罪过
  • 2021-02-11 23:58
1 0.48
2 3.81
3 22.38
4 47.62
5 50.08
6 53.80
上面的2组数据 建立数据模型X=13.14-26.3338T+14.2695T^2-1.4653T^3
怎样求相关系数 并进行F检验
T是分别取 1 2 3 4 5 6 X对应的值是0.48 3.81 22.38 47.62 50.08 53.80
最佳答案
  • 五星知识达人网友:舍身薄凉客
  • 2021-02-12 00:43
^t=[1:6]';
X=[0.48 3.81 22.38 47.62 50.08 53.80]';
T=[ones(t),t,t.^2,t.^3]';
[b,bint,r,rint,stats]=regress(X,T)
得出来的stats的第2个值就是F值
全部回答
  • 1楼网友:纵马山川剑自提
  • 2021-02-12 01:12
the following explaination may help u: two-sample f-test for equal variances syntax h = vartest2(x,y) h = vartest2(x,y,alpha) h = vartest2(x,y,alpha,tail) [h,p] = vartest2(...) [h,p,ci] = vartest2(...) [h,p,ci,stats] = vartest2(...) [...] = vartest2(x,y,alpha,tail,dim) description h = vartest2(x,y) performs an f test of the hypothesis that two independent samples, in the vectors x and y, come from normal distributions with the same variance, against the alternative that they come from normal distributions with different variances. the result is h = 0 if the null hypothesis (variances are equal) cannot be rejected at the 5% significance level, or h = 1 if the null hypothesis can be rejected at the 5% level. x and y can have different lengths. x and y can also be matrices or n-dimensional arrays. for matrices, vartest2 performs separate tests along each column, and returns a vector of results. x and y must have the same number of columns. for n-dimensional arrays, vartest2 works along the first nonsingleton dimension. x and y must have the same size along all the remaining dimensions. h = vartest2(x,y,alpha) performs the test at the significance level (100*alpha)%. alpha must be a scalar. h = vartest2(x,y,alpha,tail) performs the test against the alternative hypothesis specified by tail, where tail is one of the following single strings: 'both' — variance is not y (two-tailed test). this is the default. 'right' — variance is greater than y (right-tailed test). 'left' — variance is less than y (left-tailed test). [h,p] = vartest2(...) returns the p-value, i.e., the probability of observing the given result, or one more extreme, by chance if the null hypothesis is true. small values of p cast doubt on the validity of the null hypothesis. [h,p,ci] = vartest2(...) returns a 100*(1-alpha)% confidence interval for the true variance ratio var(x)/var(y). [h,p,ci,stats] = vartest2(...) returns a structure with the following fields: 'fstat' — value of the test statistic 'df1' — numerator degrees of freedom of the test 'df2' — denominator degrees of freedom of the test [...] = vartest2(x,y,alpha,tail,dim) works along dimension dim of x. to pass in the default values for alpha or tail use []. example is the variance significantly different for two model years, and what is a confidence interval for the ratio of these variances? load carsmall [h,p,ci] = vartest2(mpg(model_year==82),mpg(model_year==76))
  • 2楼网友:玩世
  • 2021-02-12 00:56
很想帮忙 但是你给的信息太乱了吧 首先怎么个两组数据? 是竖着看 每组六个元素吗? 是要对T 进行求解? 摆脱再说详细点吧
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯