"""
    StudentsTLikelihood(σ²)

Student's T likelihood with `ν` degrees of freedom and variance `σ²` variance. 
This is to be used if we assume that the uncertainity associated with the data 
follows a Student's T distribution.

```math
    p(y|f) = StudentsT(y | f, σ², ν)
```
On calling, this would return a Student's T distribution with mean `f`, variance σ² 
and `ν` degrees of freedom.
"""
struct StudentsTLikelihood{T<:Real}
    ν::Int
    σ²::T
end

@functor StudentsTLikelihood (σ²,)

(l::StudentsTLikelihood)(f::Real) = LocationScale(f, sqrt(l.σ²), TDist(l.ν))

(l::StudentsTLikelihood)(fs::AbstractVector{<:Real}) = Product(LocationScale.(fs, sqrt(l.σ²), TDist(l.ν)))
