File:Edgeworth expansion of the density of the sample mean of three Chi2 variables.png

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Edgeworth_expansion_of_the_density_of_the_sample_mean_of_three_Chi2_variables.png(480 × 480 pixels, file size: 31 KB, MIME type: image/png)

Summary

Description
English: This is a statistical chart that shows the density of the sample mean of three chi2 variables. The chart compares the true density, the normal approximation, and two edgeworth expansions
Date
Source Own work
Author EtudiantEco

Source Code

This chart was created with the software R, version 3.02, using the package EQL [1]

library(EQL)

n <- 3
df <- 2


### Set grid:
x_eval_chi <- seq(0,10, by=0.05)

## true distribution:
true <- dgamma(x=x_eval_chi, shape=df*n/2, scale=2/n)

##Plot true
plot(x_eval_chi, true, col=1, lty=1, type="l", xlab="x", ylab="density", lwd=2)
title(expression(paste("Density of the sample mean of three ", chi^2, "(2) variables")))

## add normal approximation:
lines(x_eval_chi, dnorm(x_eval_chi,mean=df, sd=sqrt(2*df/n)), col=3, lwd=2)

## compute edgeworth approximations:
edge_2 <- edgeworth(x_eval_chi, n=n, mu=df, sigma2=2*df, rho3=sqrt(8/df), 
	  rho4=12/df, type="mean", deg=2)$approx
edge_3 <- edgeworth(x_eval_chi, n=n, mu=df, sigma2=2*df, rho3=sqrt(8/df), 
	  rho4=12/df, type="mean", deg=3)$approx]]

## add edgeworth on graph:
lines(x_eval_chi, edge_2, col=4)
lines(x_eval_chi, edge_3, col=4, lty=2)

## add legend:
legend("topright", leg=c("True", "Edgeworth, degree 2", "Edgeworth, degree 3", "Normal"), 
col=c(1,4,4,3), lty=c(1,1,2,1))

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
  1. http://cran.r-project.org/web/packages/EQL/index.html

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

3 November 2013

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current16:44, 3 November 2013Thumbnail for version as of 16:44, 3 November 2013480 × 480 (31 KB)EtudiantEcoUser created page with UploadWizard
The following pages on the English Wikipedia use this file (pages on other projects are not listed):

Global file usage

The following other wikis use this file: