Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R中的假设检验_R_Linear Regression_Hypothesis Test - Fatal编程技术网

R中的假设检验

R中的假设检验,r,linear-regression,hypothesis-test,R,Linear Regression,Hypothesis Test,我目前正在做数据集的线性回归。我需要检验假设H0:B1=0与H1:B1=/=0的显著性lvl a=0.05,并找到p值。我运行命令summary(lm(y~x~),p值为0.02781,但是当我尝试t.test(x,y)时,我得到了p值=5.71e-15这是为什么?摘要的p值对应于回归模型beta的t检验。如果运行t.test(x,y),则测试x和y的平均值是否相等,这与测试B1是否等于/不等于零无关。请提供

我目前正在做数据集的线性回归。我需要检验假设H0:B1=0与H1:B1=/=0的显著性lvl a=0.05,并找到p值。我运行命令
summary(lm(y~x~)
p值为0.02781
,但是当我尝试
t.test(x,y)
时,我得到了
p值=5.71e-15
这是为什么?

摘要的p值对应于回归模型beta的t检验。如果运行t.test(x,y),则测试x和y的平均值是否相等,这与测试B1是否等于/不等于零无关。

请提供