File:T distribution 2df enhanced.svg

原始檔案(SVG 檔案,表面大小:360 × 360 像素,檔案大小:29 KB)


摘要

描述
English: Student's t-distribution with 2 degrees of freedom. Enhanced imaging.
日期
來源 自己的作品
作者 IkamusumeFan
SVG開發
InfoField
 
SVG檔案的原始碼通過W3C驗證
 
向量圖形使用Matplotlib創作。
原始碼
InfoField

Python code

import numpy as np
import matplotlib.pyplot as plt
import scipy.special as sp
 
X = np.arange(-4, 4, 0.01)	# range of the graph                                                                            
 
plt.clf()
plt.figure(figsize=(4,4))
plt.axes([0.17,0.13,0.79,0.8])
plt.hold(True)

Q = []	# No curves at first.

# Draw the curve of Normal distribution
mu = 0	# mean = 0
sigma = 1	# variance = 1
A = 1/(sigma*np.sqrt(2*np.pi))
B = np.exp(-(X-mu)*(X-mu)/(2*sigma*sigma));
Y = A*B
a = plt.plot(X, Y, '-', color='blue', lw=2)
Q.append(a)

# Draw the curve of Student's t-distribution
mu = 0	# mean = 0
nu = 2	# freedom degree = 2
A = np.exp(sp.gammaln((nu+1)/2.0));
B = np.exp(sp.gammaln(nu/2.0))*np.sqrt(nu*np.pi);
C = (1+X*X/nu)**(-(nu+1)/2.0);
Y = A*C/B;
a = plt.plot(X, Y, '-', color='red', lw=2)
Q.append(a)

# Draw the previous Student's t-distributions
for previous_nu in range(1,nu):
	mu = 0	# mean = 0
	A = np.exp(sp.gammaln((previous_nu+1)/2.0));
	B = np.exp(sp.gammaln(previous_nu/2.0))*np.sqrt(previous_nu*np.pi);
	C = (1+X*X/previous_nu)**(-(previous_nu+1)/2.0);
	Y = A*C/B;
	a = plt.plot(X, Y, '-', color='green', lw=1)
	Q.append(a)

# Remaining steps to finish drawing the graph. 
plt.xlabel("x")
plt.ylabel("P(x)")
plt.xlim(-4,4)

# Saving the output.
plt.savefig("T_distribution_1df.pdf")
plt.savefig("T_distribution_1df.eps")
plt.savefig("T_distribution_1df.svg")

授權條款

我,本作品的著作權持有者,決定用以下授權條款發佈本作品:
w:zh:共享創意
姓名標示 相同方式分享
您可以自由:
  • 分享 – 複製、發佈和傳播本作品
  • 重新修改 – 創作演繹作品
惟需遵照下列條件:
  • 姓名標示 – 您必須指名出正確的製作者,和提供授權條款的連結,以及表示是否有對內容上做出變更。您可以用任何合理的方式來行動,但不得以任何方式表明授權條款是對您許可或是由您所使用。
  • 相同方式分享 – 如果您利用本素材進行再混合、轉換或創作,您必須基於如同原先的相同或兼容的條款,來分布您的貢獻成品。

說明

添加單行說明來描述出檔案所代表的內容

在此檔案描寫的項目

描繪內容

創作作者 Chinese (Hong Kong) (已轉換拼寫)

沒有維基數據項目的某些值

作者姓名字串 繁體中文 (已轉換拼寫):​IkamusumeFan
維基媒體使用者名稱 繁體中文 (已轉換拼寫):​IkamusumeFan

著作權狀態 繁體中文 (已轉換拼寫)

有著作權 繁體中文 (已轉換拼寫)

檔案來源 Chinese (Taiwan) (已轉換拼寫)

上傳者的原創作品 繁體中文 (已轉換拼寫)

檔案歷史

點選日期/時間以檢視該時間的檔案版本。

日期/時間縮⁠圖尺寸用戶備⁠註
目前2013年7月21日 (日) 04:36於 2013年7月21日 (日) 04:36 版本的縮圖360 × 360(29 KB)IkamusumeFanThe previous edition is incorrect on the degrees of freedom.
2013年7月21日 (日) 03:51於 2013年7月21日 (日) 03:51 版本的縮圖360 × 360(29 KB)IkamusumeFanUser created page with UploadWizard

下列頁面有用到此檔案:

全域檔案使用狀況

以下其他 wiki 使用了這個檔案:

詮釋資料