How to calculate 2-tailed P value using t value and degree of freedom?

9 次查看(过去 30 天)
Hi all, I have gotten the t value and degree of freedom of paired data in T-Test .I need to calculate the 2-tailed P value using t value and degree of freedom.I know that the function 'tcdf' can calculate 1-tailed P value.But I still don't know how to calculate 2-tailed P value. I will be very appreciate your answers. Thank you!

采纳的回答

Star Strider
Star Strider 2015-2-4
You can simply cut to the chase and calculate it directly:
tdist2T = @(t,v) (1-betainc(v/(v+t^2),v/2,0.5)); % 2-tailed t-distribution
where ‘t’ is the t-statistic and ‘v’ the degrees-of-freedom.
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by