1

What I want is to draw a chi square distribution - both a central and non-central into one plot and draw parts of the surface underneath as solid color.

Note: I read Plotting the chi square distribution with TikZ but none of the solutions allows drawing a non-centralchi square distribution

6
  • 2
    I do not find any question in your post. What have you tried, where do you fail? Where is the code we can start with? And personally: I do not know by head what a non-central chi square distribution is. You should make that clear by an image or give us the formula which shall be plotted. Please show some own effort as this site is not about getting work done by others. Thank you. – LaRiFaRi Jan 14 '15 at 8:10
  • @LaRiFaRi - See the entry Noncentral chi-squared distribution at Wikipedia. :-) – Mico Jan 14 '15 at 8:20
  • Re the earlier posting you've cited: It employs the formula for the probability density function (pdf) of central chi-squared distributions. Are you having a problem adapting this code to plot the pdfs of non-central chi-squared distributions? The closed-form expression of a non-central chi-squared distribution is very similar to that of a central chi-squared distribution... – Mico Jan 14 '15 at 8:24
  • It looks like gnuplot cannot plot Modified Bessel functions of first kind so you'll have to use an external tool to compute the points and plot them with TiKZ or pgfplots. – Ignasi Jan 14 '15 at 8:39
  • That is exactly my issue, gnuplot is too dumb, and I did not find a method of pgffoo that provides non central chi square distribution. Also there is no closed form of a non-central chi squared distribution, only a sum of infinite number of weighted chi squared distributions. So I do not have an idea if I can do this directly in tex or if I have to fallback to R which I am not familiar with at all. – drahnr Jan 14 '15 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.