How to define variables correctly in qt function in R

for the question: If T has the Student's t distribution with 5 degrees of freedom, find t so that 2*P(T > t) = 0.09 I basically tried all of the following and the answer is wrong. I am not yet really so connected with the R syntax and don't know how to use qt. Any idea?

> 1-qt(0.045,5)
[1] 3.097837
> qt(0.045,5)
[1] -2.097837
> 1-qt(0.09,5)
[1] 2.557869

Answers


qt(0.09 / 2, 5, lower.tail = FALSE)
##[1] 2.097837

From ?qt:

lower.tail: logical; if TRUE (default), probabilities are P[X <= x],
          otherwise, P[X > x].

Need Your Help

Restricting Tika LanguageIdentifier to specific languages only

java apache apache-tika

I am trying to restrict the Apache Tika LanguageIdentifier to an array of languages. When i run my code below, it only detects texts as "de", hence german. The reason i want to do this is to let the