>>>>>>#import matplotlib.pyplot as plt
import numpy as np
# Create x and y
x = np.linspace(0, 20, 100)
y = x**3.8 * np.exp(-x)
# Create the plot
fig, ax = plt.subplots()
plt.plot(x, y, label='f(x) = x^(3.8) * np.exp(-x)', linewidth=3, color='palegreen') ax.fill_between(x, 0, y, color='yellowgreen')
# Make the x=0, y=0 thicker
ax.t_aspect('equal')
ax.axhline(y=0, color='k')
ax.axvline(x=0, color='k')
# Add a title
plt.title('f(x) = x^(3.8)*e^(-x) ', fontsize=20)
# Add X and y Label
plt.xlabel('x', fontsize=16)
plt.ylabel('f(x)' ,fontsize=16)高昌古城
plt.ylabel('f(x)' ,fontsize=16)
梁师都# Add a grid
# Add a Legend
plt.legend(bbox_to_anchor=(1, 1), loc='upper right', borderaxespad=1, fontsize=12)
# Show the plot
plt.show()
5.伽玛函数属性
如果您从这篇⽂章中删除⼀件事,应该是本节。
> 给定z> 1 Γ(z)=(z-1)*Γ(z-1) 或将其写为 Γ(z + 1)= z *Γ(z)
让我们使⽤部分集成和Gamma函数的定义来证明它.
如果n是⼀个正整数 C(n)=(n-1)!
什么是Γ(1) ?
因此,Γ(n)=(n-1)!
您可能还已经看到表达式Γ(n + 1)= n!⽽不是 Γ(n)=(n-1)!。 这只是使右⼿边n!,⽽不是(n-1)! 我们所做的就是将n移1。
6.使⽤Gamma函数的属性,显⽰Gamma分布的PDF积分为1。
快速回顾⼀下Gamma“分布”(不是Gamma“函数”!):Gamma分布直觉和推导。 证明如下: