Skip to main content
`Ctrl`+`K`

# scipy.special.stdtridf

scipy.special.stdtridf(p, t, out=None) = <ufunc 'stdtridf'>

  Inverse of `stdtr` vs df

  Returns the argument df such that stdtr(df, t) is equal to p.

  Parameters:
    p array_like

      Probability

    t array_like

      Upper bound of the integral

    out ndarray, optional

      Optional output array for the function results

  Returns:
    df scalar or ndarray

      Value of df such that `stdtr(df, t) == p`

  See also

  `stdtr`

    Student t CDF

  `stdtrit`

    inverse of stdtr with respect to t

  `scipy.stats.t`

    Student t distribution

  Examples

  Compute the student t cumulative distribution function for one parameter set.

      >>> from scipy.special import stdtr, stdtridf
      >>> df, x = 5, 2
      >>> cdf_value = stdtr(df, x)
      >>> cdf_value
      0.9490302605850709

  Verify that `stdtridf` recovers the original value for df given the CDF value and x.

      >>> stdtridf(cdf_value, x)
      5.0