Question

# use r-studio code to compute 1. Let T ∼ t – distributed with the given degrees...

use r-studio code to compute
1. Let T ∼ t – distributed with the given degrees of freedom (df), then compute the following probabilities with a nice little picture beside each problem: [5 points]

(e) df = ∞, P(T > 2.3)

2. Let T ∼ t – distributed with the given degrees of freedom (df), compute the following quantiles (percentiles) with a nice little picture beside each problem: [5 points]
(a) df = 2, 0.05th percentile
(b) df = 7, 7th percentile
(c) df = 50, 0.2nd percentile
(d) df = 27, 0th percentile

(e) df = ∞, 97.5th percentile

3. For given ¯x, µ, s, and n, compute the following probabilities for the random variable
T =

¯ x−µ s/√n, where T ∼ t – distributed with n−1 degrees of freedom. [8 points]

(a) n = 29, µ = 5, ¯ x = 4.5, s = 1.05. Compute P(T < t).

(b) n = 10, µ = 50, ¯ x = 45, s = 7.25. Compute P(T > t).

(c) n = 11, µ = 19, ¯ x = 20, s = 2.32. Compute P(|T| < t).

(d) n = 20, µ = 25, ¯ x = 26.28, s = 7.5. Compute P(|T| > t).

R codes :

#QUESTION : 3

> T_stat=function(n,mu,x,s)
+ {
+ T=sqrt(n)*(x-mu)/s
+ return(T)
+ }

#(a) P(T<t)
> pt(T_stat(29,5,4.5,1.05),29-1,lower.tail=T)
[1] 0.007994645

#(b)P(T>t)
> pt(T_stat(10,50,45,7.25),10-1,lower.tail=F)
[1] 0.9714538

#(c) P(|T|<t) = P(T<t)-P(T<-t)
> pt(T_stat(11,19,20,2.32),11-1,lower.tail=T)-pt(-(T_stat(11,19,20,2.32)),11-1,lower.tail=T)
[1] 0.8166736

#(d) P(|T|>t) = P(T>t)+P(T<-t)
> pt(T_stat(20,25,26.28,7.5),20-1,lower.tail=F)+pt(-(T_stat(20,25,26.28,7.5)),20-1,lower.tail=T)
[1] 0.4546908

#### Earn Coins

Coins can be redeemed for fabulous gifts.