Question: ))using R progrem do the following )) 4. t-distribution. Compute the following probabilities and quantiles for the t6 distribution. (a) P(t6 < 1). (b) P(t6

))using R progrem do the following ))

4. t-distribution. Compute the following probabilities and quantiles for the t6 distribution.

(a) P(t6 < 1).

(b) P(t6 > 2).

(c) P(1 < t6 < 1).

(d) P(2 < t6 < 2).

(e) The quantiles t0.025, t0.5, and t0.975.

((script))

# 3.2.4 t-Distribution ########################################

# Example 1. Load the TeachingDemos package and execute... library(TeachingDemos) vis.t()

# Example 2. A quick NCBI scan makes it reasonable to assume that ... n <- 11 gdf5 = grep("GDF5",golub.gnames[ ,2], ignore.case = TRUE) gdf5 x <- golub[gdf5, golubFactor=="AML"] t.value <- sqrt(n)*(mean(x)-0)/sd(x) t.value

1 - pt(1.236324, 10) # right-side tail of the t-distribution cumulative density function (CDF)

f<-function(x) { dt(x,10) } plot(f, # function -5, # start 5, # end cex.lab=1.5, # make axis labels big xlab="x", ylab="t-Distribution probability density function f(x)") x1 <- seq(-5,1.24,0.01) x2 <- seq(1.24,5,0.01) polygon(c(-5,x1,1.24), c(0,f(x1),0), col="lightblue") polygon(c(1.24,x2,5), c(0,f(x2),0), col="magenta") mtext("1.24",side=1,at=1.24, col="red") arrows(2.7,0.20,2.7,0.01, lwd=3, col="green") text(1.8, 0.3 - c(0,.043, .086), cex = 1.2, adj=c(0,0), col="blue", c(expression(P(X >= 1.24)), expression(paste(" = ", integral(f(x) * dx, 1.24, infinity))), expression(paste(" = ", 1 - integral(f(x) * dx, -infinity, 1.24)))))

F<-function(x) { pt(x,10) } plot(F, # function -5, # start 5, # end cex.lab=1.5, # make axis labels big col="red", lwd=6, # make line thicker xlab="x", ylab="t-Distribution cumulative distribution function F(x)") mtext("1.24",side=1,at=1.24, col="red") mtext("0.88",side=2,at=0.88, col="red") arrows(-1,0.88,1.24,0.88, lwd=3, col="green") text(-3.7, 0.85 - c(0,.11,.22,.33,.44,.55), cex=1.2, adj=c(0,0), col="blue", c(expression(P(X >= 1.24)), expression(paste(" = ", 1 - integral(f(x) * dx, -infinity, 1.24))), expression(paste(" = ", 1 - bgroup("[", F(x) ,"]")[-infinity]^1.24)), expression(paste(" = ", 1 - CDF(1.24))), expression(paste(" = ", 1 - 0.88)), expression(paste(" = ", 0.12))))

pt(2, 10) - pt(-2, 10) qt(0.025, n-1)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!