File:Logistic-t-normal-tails.svg

页面内容不支持其他语言。
這個文件來自維基共享資源
维基百科,自由的百科全书

原始文件(SVG文件,尺寸为630 × 630像素,文件大小:481 KB)


摘要

描述
English: Comparison of standard logistic distribution with closest normal and Student's t distributions, by matching moments -- tail portion.

Created using the following R code:

Source Code
logistic.t.norm = function(xmin, xmax, yplot.max, filename) {
# Generate npoints from xmin to xmax
npoints=10000
scalefact=npoints/(xmax - xmin)
x=(xmin*scalefact):(xmax*scalefact)/scalefact

ylim=c(0,yplot.max) # Minimum and maximum Y limits
svg(filename)
# cex=font scaling, mai=margins (reduced as much as possible)
par(cex=1.5,mai=c(0.8,0.8,0.2,0.1))
# Plot blue logistic curve; lwd=line width, type="l" means use a line
plot(x,dlogis(x),type="l",xlab="", ylab="",lwd=3,col="blue",ylim=ylim)
abline(v=0,lty=3) # Draw a dotted vertical line at 0 (lty=line type, 3=dotted)
# Set Student t params to match moments of logistic
df = 9; shape = sqrt((df-2)/df*pi*pi/3) 
# Plot red Student t curve; lwd=line width, lty=line type (3=dotted)
points(x,dt(x/shape,df)/shape,type="l",lty=3,col="red",lwd=3)
# Set normal params to match moments of logistic
sd = sqrt(pi*pi/3)
# Draw std dev lines (currently only at +/- 1 std dev, alternatively at all of them)
#for (sdevs in 1:floor(xmax/sd)) {
for (sdevs in 1:1) {
  abline(v=-sd*sdevs,lty=2) # Draw a dashed vertical line at -1 std dev (lty 2=dashed)
  abline(v=sd*sdevs,lty=2) # Draw a dashed vertical line at +1 std dev (lty 2=dashed)
}
# Add std dev ticks along the top
axis(3,at=-floor(xmax/sd):floor(xmax/sd)*sd,labels=FALSE)
# Plot green normal curve; lwd=line width, lty=line type (3=dotted)
points(x,dnorm(x,0,sd),type="l",lty=3,col="green",lwd=3)
# Draw legend in bottom center
legend("bottom", c("logistic(0,1)", sprintf("t(%g,0,%g)",df,shape), sprintf("norm(0,%g)", sd), sprintf("std dev=%g", sd)), cex=0.9,col = c("blue","red","green", "black"), lty=c(1,3,3,2),lwd=c(3,3,3,1))
dev.off()
}

logistic.t.norm(-12,12,0.01,"logistic-t-normal-tails.svg")
日期
来源 Created using R
作者 Benwing

许可协议

我,本作品著作权人,特此采用以下许可协议发表本作品:
GNU head 已授权您依据自由软件基金会发行的无固定段落及封面封底文字(Invariant Sections, Front-Cover Texts, and Back-Cover Texts)的GNU自由文件许可协议1.2版或任意后续版本的条款,复制、传播和/或修改本文件。该协议的副本请见“GNU Free Documentation License”。
w:zh:知识共享
署名 相同方式共享
This file is licensed under the Creative Commons Attribution-Share Alike Attribution-Share Alike 4.0 International, 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic license.
您可以自由地:
  • 共享 – 复制、发行并传播本作品
  • 修改 – 改编作品
惟须遵守下列条件:
  • 署名 – 您必须对作品进行署名,提供授权条款的链接,并说明是否对原始内容进行了更改。您可以用任何合理的方式来署名,但不得以任何方式表明许可人认可您或您的使用。
  • 相同方式共享 – 如果您再混合、转换或者基于本作品进行创作,您必须以与原先许可协议相同或相兼容的许可协议分发您贡献的作品。
您可以选择您需要的许可协议。

说明

添加一行文字以描述该文件所表现的内容

此文件中描述的项目

描繪內容

image/svg+xml

文件历史

点击某个日期/时间查看对应时刻的文件。

日期/时间缩⁠略⁠图大小用户备注
当前2012年3月28日 (三) 04:362012年3月28日 (三) 04:36版本的缩略图630 × 630(481 KB)Benwingadd std dev tick lines on top, stretch out Y axis
2012年3月28日 (三) 03:232012年3月28日 (三) 03:23版本的缩略图630 × 630(404 KB)Benwingadd std dev lines
2012年3月28日 (三) 03:102012年3月28日 (三) 03:10版本的缩略图630 × 630(399 KB)Benwing{{Information |description = {{en|1=Comparison of standard logistic distribution with closest normal and Student's t distributions, by matching moments -- tail portion. Created using the following R code: {{cot|Source Code}} <source lang="rsplus"> logi...

以下页面使用本文件: