## #350 closed enhancement (wontfix)

# function to calculate t-score-pvalue from t-score and dof

Reported by: | Peter | Owned by: | Peter |
---|---|---|---|

Priority: | minor | Milestone: | yat 0.5 |

Component: | statistics | Version: | trunk |

Keywords: | Cc: |

### Description

The code is for this is already there, see tTest class.

### Change History (4)

### comment:1 Changed 13 years ago by

Component: | test → statistics |
---|

### comment:2 follow-up: 3 Changed 13 years ago by

Resolution: | → wontfix |
---|---|

Status: | new → closed |

### comment:3 follow-up: 4 Changed 13 years ago by

Replying to peter:

This functionality already exists in GSL. No reason to add it in yat.

Use

`gsl_cdf_tdist_Q(t, dof);`

Your comment confuses me. It is in GSL but isn't it already in yat? See function at http://trac.thep.lu.se/yat/browser/trunk/yat/statistics/tTest.cc#L74

### comment:4 Changed 13 years ago by

Replying to jari:

Replying to peter:

This functionality already exists in GSL. No reason to add it in yat.

Use

`gsl_cdf_tdist_Q(t, dof);`

Your comment confuses me. It is in GSL but isn't it already in yat? See function at http://trac.thep.lu.se/yat/browser/trunk/yat/statistics/tTest.cc#L74

The function you refer to is to calculate the p-value from a tTest object. This ticket was about adding a function calculating p-value from a t-score and dof. Having t-score and dof, you can of course create a corresponding tTest object, but it is not the optimal way of calculating the p-value. This ticket was about adding that optimal way: a free function. However, as I've already said: That functionality already exists in GSL, so no need to add it to yat.

**Note:**See TracTickets for help on using tickets.

This functionality already exists in GSL. No reason to add it in yat.

Use

`gsl_cdf_tdist_Q(t, dof);`