pangolin.interface.Interface.student_t

pangolin.interface.Interface.student_t#

Interface.student_t(nu, mu, sigma)[source]#

Create a StudentT distributed RV (Wikipedia).

All arguments must either be scalar or mutually broadcastable according to the broadcasting policy selected when constructing the interface or within an overload block.

Parameters:
  • nu (RVLike) – degress of freedom.

  • mu (RVLike) – location (often 0).

  • sigma (RVLike) – scale (often 1).

Returns:

ir.RV – RV whose operation is pangolin.ir.StudentT when all parents are scalar, or one or more nested pangolin.ir.VMap operations around that type when broadcasting is required. The operation has 3 parents.

Return type:

RV

Examples

>>> pi = Interface()
>>> x = pi.student_t(0.1, 0.2, 0.4)
>>> x
RV(StudentT(), RV(Constant(0.1)), RV(Constant(0.2)), RV(Constant(0.4)))
>>> x.shape
()
>>> y = pi.student_t([0.1, 0.1], 0.2, 0.4)
>>> y
RV(VMap(StudentT(), [0, None, None], 2), RV(Constant([0.1,0.1])), RV(Constant(0.2)), RV(Constant(0.4)))
>>> y.shape
(2,)