Log-t distribution#
Taking the exponential of a random variable that follows a Student’s t-distribution gives a log-t distributed random variable; i.e., the natural logarithm of the random variable follows a Student’s t-distribution.
import fesslix as flx
flx.load_engine()
import numpy as np
import fesslix.plot as flx_plot
import matplotlib.pyplot as plt
%matplotlib inline
Random Number Generator: MT19937 - initialized with rand()=630627209;
Random Number Generator: MT19937 - initialized with 1000 initial calls.
Syntax#
- property logt#
logt-t distribution
logtis a distribution type (flx_rv_type) for Random variables in Fesslix.- Parametrization:
The parametrization of the log-t distribution is equivalent to the parametrization of the Student’s t-distribution.
Example:
rv_1 = flx.rv({'name':'rv_1', 'type':'logt', 'dof':3., 'loc':2., 'scale':1. })
rv_2 = flx.rv({'name':'rv_2', 'type':'logt', 'dof':3., 'loc':2., 'val_1':1., 'pr_1':0.05 })
rv_3 = flx.rv({'name':'rv_3', 'type':'logt', 'dof':3., 'loc':2., 'val_1':1.8, 'pr_1':0.05 })
rv_lst = [ rv_1, rv_2, rv_3 ]
PDF#
x_bound = 15.
fig, ax = plt.subplots(figsize=(10, 4))
for rv in rv_lst:
flx_plot.draw_pdf(ax, rv, config_dict={'label':rv.get_name(), 'x_low':1e-6, 'x_up':x_bound})
ax.set_ylim([0., 0.6])
ax.set_xlim([0., x_bound])
plt.xlabel(r"$x$")
plt.ylabel(r"$f_X(x)$")
plt.legend()
plt.show()
CDF#
x_bound = 15.
fig, ax = plt.subplots(figsize=(10, 4))
for rv in rv_lst:
flx_plot.draw_cdf(ax, rv, config_dict={'label':rv.get_name(), 'x_low':1e-6, 'x_up':x_bound})
ax.set_ylim([0., 1.])
ax.set_xlim([0., x_bound])
plt.xlabel(r"$x$")
plt.ylabel(r"$F_X(x)$")
plt.legend()
plt.show()