RE: Chi-square chart in Excel
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ronny Richardson Sent: Wednesday, February 20, 2002 7:29 PM To: [EMAIL PROTECTED] Subject: Chi-square chart in Excel Can anyone tell me how to produce a chart of the chi-square distribution in Excel? (I know how to find chi-square values but not how to turn those into a chart of the chi-square curve.) Ronny Richardson --- Excel does not have a function that gives the Chi-Square density The following might be helpful regarding future graphs. It is a fraction of a larger package I am preparing. It is awkward to present it in .txt format. DISTRIBUTIONDENSITY CUMMULATIVE I NVERSE BetaBETADISTBETAINV BinomialBINOMST CRITBINOM Chi-Square CHIDIST CHINV Exponential EXPONDIST EXPONDIST F FDIST FINV Gamma GAMMADIST GAMMADIST GAMMAINV Hyper geometric HYPGEOMDIST Log Normal LOGNORMDIST LOGINV Negative Binomial NEGBINOMDIST Normal(with parameters) NORMDISTNORMDISTNORMINV Normal (z values) NORMSDIST NORMSINV Poisson POISSON t TDIST TINV Weibull WEIBULL You have to build a column (say B) of X values. Build an expression for column C calculating the Chi-Square density, given the x value in col B and the df value in A1. It would be =exp(($A$1/2)*LN(2) + GAMMALN($A$1/2) + (($A$1/2)-1)*LN(B1) - B1/2) without the quotes. You can equation-drag this cell down column C for each X value. Now build a smoothed scatter plot graph as series 1 with the X value column B and the Y value as column C. DAHeiser = Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at http://jse.stat.ncsu.edu/ =
RE: Chi-square chart in Excel
sure is easy in minitab ... one can draw a very nice curve (it's easy but, hard to post here) but, to make a distribution easy for viewing we can MTB rand 10 c1; generated 10 values from SUBC chis 4. a chi square distribution with 4 degrees of freedom MTB dotp c1 Dotplot: C1 Each dot represents up to 778 points . .::. : .::. : ::. :. ::. .. +-+-+-+-+-+---C1 0.0 6.0 12.0 18.0 24.0 30.0 MTB desc c1 Descriptive Statistics: C1 Variable N Mean Median TrMean StDevSE Mean C1 10 4.0123 3.3729 3.7727 2.8350 0.0090 Variable MinimumMaximum Q1 Q3 C1 0.008029.4143 1.9236 5.4110 not quite as fancy as the professional graph but, will do in a pinch At 06:27 PM 2/21/02 -0800, David Heiser wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Ronny Richardson Sent: Wednesday, February 20, 2002 7:29 PM To: [EMAIL PROTECTED] Subject: Chi-square chart in Excel Can anyone tell me how to produce a chart of the chi-square distribution in Excel? (I know how to find chi-square values but not how to turn those into a chart of the chi-square curve.) Ronny Richardson --- Excel does not have a function that gives the Chi-Square density The following might be helpful regarding future graphs. It is a fraction of a larger package I am preparing. It is awkward to present it in .txt format. DISTRIBUTIONDENSITY CUMMULATIVE I NVERSE BetaBETADIST BETAINV BinomialBINOMST CRITBINOM Chi-Square CHIDIST CHINV Exponential EXPONDIST EXPONDIST F FDIST FINV Gamma GAMMADIST GAMMADIST GAMMAINV Hyper geometric HYPGEOMDIST Log Normal LOGNORMDIST LOGINV Negative Binomial NEGBINOMDIST Normal(with parameters) NORMDISTNORMDISTNORMINV Normal (z values) NORMSDIST NORMSINV Poisson POISSON t TDIST TINV Weibull WEIBULL You have to build a column (say B) of X values. Build an expression for column C calculating the Chi-Square density, given the x value in col B and the df value in A1. It would be =exp(($A$1/2)*LN(2) + GAMMALN($A$1/2) + (($A$1/2)-1)*LN(B1) - B1/2) without the quotes. You can equation-drag this cell down column C for each X value. Now build a smoothed scatter plot graph as series 1 with the X value column B and the Y value as column C. DAHeiser = Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at http://jse.stat.ncsu.edu/ = = Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at http://jse.stat.ncsu.edu/ =
Re: Chi-square chart in Excel
Ronny Richardson wrote: Can anyone tell me how to produce a chart of the chi-square distribution in Excel? (I know how to find chi-square values but not how to turn those into a chart of the chi-square curve.) Ronny Richardson = Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at http://jse.stat.ncsu.edu/ = I assume you want the pdf, not the cdf. Set up a column of x's (e.g. 0,0.2, 0.4, ...), and beside it set up a column of pdf values (type in the pdf for the chisq you're after as a function of x): For m d.f.: 1/[Gamma(m/2)*2^(m/2)]*x^(m/2-1)*exp(-x/2) (in excel you'll need exp(gammaln()) because it doesn't have a Gamma function.) Note that you can set up m in a cell, so you can play around with the d.f. and see what it does to the curve. So now you have 2 columns you can plot. Click on the chart icon, choose the XY(scatter) plot option, pick either the joined with lines or joined with a curve pictures (without the points marked - either of the rightmost plots there). Choose any other options you need, and there you go. Glen = Instructions for joining and leaving this list, remarks about the problem of INAPPROPRIATE MESSAGES, and archives are available at http://jse.stat.ncsu.edu/ =