+\begin{tikzpicture}
+ \begin{axis}[axis lines=left,
+ ticks=none,
+ xmin=0,
+ ymax=0.5,
+ enlargelimits=upper,
+ ylabel={\(\Pr(X=x)\)},
+ xlabel={\(x\)},
+ every axis x label/.style={at={(current axis.right of origin)},anchor=north west},
+ every axis y label/.style={at={(axis description cs:-0.02,0.5)}, anchor=south west, rotate=90},
+ ]
+ \fill[pattern=north east lines, pattern color=orange] (0,0) -- plot[domain=0:1.68, samples=50] function {abs(x)*exp(-x)} -- (1.68,0) -- cycle;
+ \fill[pattern=north west lines, pattern color=red] (1.68,0) -- plot[domain=1.68:5, samples=50] function {abs(x)*exp(-x)} -- (5,0) -- cycle;
+ \draw[dashed, blue, very thick] (axis cs:1.68,0) -- (axis cs:1.68,0.31) node [above, anchor=south west, black] {Median};
+ \draw[dashed, blue, very thick] (axis cs:2,0) -- (axis cs:2,0.27) node [above, anchor=west, black] {Mean};
+ \draw[dashed, blue, very thick] (axis cs:1,0) -- (axis cs:1,0.365) node [above, black] {Mode};
+ \node at (1,0.18) {\textbf{50\%}};
+ \node at (3.1,0.08) {\textbf{50\%}};
+ \addplot[thick, black, no markers, samples=200, domain=0:5] {abs(x)*exp(-x)};
+ \end{axis}
+\end{tikzpicture}