Data Analysis and Experimental Design 第4回 統計的検定 > cor(iris$Petal.Length,iris$Petal.Width) [1] 0.9628654 > lsfit(cars$speed, cars$dist) $coefficients Intercept X -17.579095 3.932409 Data Analysis and Experimental Design H0を棄却する H0が真 H1が真 第Ⅰ種の誤り α 1-α 1-β 第Ⅱ種の誤り β H0を棄却しない H0:γ= 0 T= r 1− r2 n−2 1 Data Analysis and Experimental Design p = pl + pu = 0.05 pl = 0.025 -2.008 pu = 0.025 2.008 Data Analysis and Experimental Design > r > n > T > T [1] <- cor(iris$Petal.Length,iris$Petal.Width) <- length(iris$Petal.Length) #標本数 <- r/(sqrt((1-r^2)/(n-2))) 43.38724 > qt(0.975,n-2) #qt(p,df):確率pのt値を与える [1] 1.976122 > 1-pt(T,n-2) #pt(t,df):t値の確率pを与える [1] 0 2 Data Analysis and Experimental Design > df <- lsfit(cars$speed, cars$dist) > ls.print(df) Residual Standard Error=15.3796 R-Square=0.6511 F-statistic (df=1, 48)=89.5671 p-value=0 Estimate Std.Err t-value Pr(>|t|) Intercept -17.5791 6.7584 -2.6011 0.0123 X 3.9324 0.4155 9.4640 0.0000 3
© Copyright 2024 ExpyDoc