\begin{tikzpicture}[
    declare function={
      gamma(\z)=(2.506628274631*sqrt(1/\z)+ 0.20888568*(1/\z)^(1.5)+ 0.00870357*(1/\z)^(2.5)- (174.2106599*(1/\z)^(3.5))/25920- (715.6423511*(1/\z)^(4.5))/1244160)*exp((-ln(1/\z)-1)*\z);},
    declare function={
        chisq(\x,\k) = (\x)^(\k/2-1) * exp(-\x/2) / (2^(\k/2)) / gamma(\k/2);
    }
]
\begin{axis}[
  xlabel = $x$,
  ylabel = {Densité de probabilité},
  samples = 200,
  restrict y to domain = 0:0.5,
  domain = 0.01:15,
  legend cell align=left]
    \foreach \k in {1,...,8} {
      \addplot+[mark={}] {chisq(x,\k)}; \addlegendentryexpanded{$k=\k$}}
  \end{axis}
\end{tikzpicture}
