To compute the "P" between two cut offs in t-distribution (two points) in R.
The example uses the d.f. = 9 i.e. n = 10 , first quantile -2.262, the second quantile is 2.262.
I used Minitab to give a graphical representation of that as below:-
pt(q = 2.262, df = 9, lower.tail = TRUE) - pt(q = -2.262, df = 9, lower.tail = TRUE)I recomend to play a little with above code, to find out the argument "lower.tail" , when it is TRUE and FALSE.
The output from R is :-
[1] 0.9499872
Which when rounded, it will be 0.95 as Minitab.
P.S
d.f. ; degree of freedom.

No comments:
Post a Comment