On 10/13/07, hany <[EMAIL PROTECTED]> wrote:

> What I want is just like Figure 1: Histogram and the Normal
> Distribution for PCC Compressive Strength Data in
> http://training.ce.washington.edu/WSDOT/Modules/08_specifications_qa/normal_distribution.htm
> (I don't know how I can post picture here.) I have a series data and
> want to get a bell curve from this data with perl.

So, first you want to analyze the data and determine the bell curve
which is the best fit. Then, you want to draw a graph (i.e., you want
your program to output an image file) to show the bell curve
superimposed over the data. Is that correct?

I should double-check that an image is your ultimate goal here. That
is, do you really need it? For example, if your need is to determine
whether the bell curve fits the data "well enough", you don't need an
image for that; there are statistical techniques that can measure the
fit of the curve.

You can draw a bar chart (for example) with off-the-shelf modules on
CPAN. But to draw a curve over a bar chart, I'd probably do that in a
separate pass. (Of course, I'd check that there isn't a module that
already does this. But I don't know of one offhand.) If a separate
pass doesn't work so well, I might try modifying or subclassing the
code in the module, or I might scrap it and write code to draw the
whole thing from scratch.

> I searched in http://search.cpan.org/ before I posted here. But I
> can't find the example. Jeff's suggestion can create splined
> (smoothed) line graphs. I think this isn't a bell curve. Am I right?
> Can you both give me more advice and example?

Well, yes and no. We're here to help beginners with Perl, and you
sound like you qualify. But we're not here to teach statistical
analysis techniques, even if the program touches upon them; we try to
keep this list mostly on-topic. (It's more accurate that way. If I
give you bad advice about Perl, the Perl experts here can put us both
back on the right track. But if I give you bad advice about
statistics, the statistics experts are busy elsewhere, reading their
own lists. You'll get better answers by directing your questions
separately to the right groups.)

In particular, I haven't seen a program that does what (I think) you
need, but I'm pretty sure I could put one together in a few hours with
a few modules from CPAN. It may take you more than a few hours, even
after you understand the underlying statistical mathematics; but it
should be do-able.

I recommend that you first get the help you need (if any) on what
statistical stuff you want to do. Next, search CPAN to select some
modules that can help you. Finally, when you have trouble writing the
Perl code to do a specific step, we're here to help you with that.

Good luck with it!

--Tom Phoenix
Stonehenge Perl Training

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to