Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Normal Dist Curves

Status
Not open for further replies.

NevG

Programmer
Oct 10, 2000
162
GB
Hi gang

Bit of a long shot this one, but would any one of a control or something, CODE perhaps that I can produce a normal distributioncurve with.

I know allthe formula of the working out but cant produce a bell diagram.

Any helpmuch appreciated

Nev G
 
To create a bell curve you only need to create a mirror of the standard distribution with an infinite set of random numbers.

To create something that looks like a bell curve you might try creating a finite set of values consisting of an average of random numbers for each data point, ie. (RND + RND + RND + RND + RND + RND) / 6 ... and then sort the values in rank order. This will give the "appearance" of a bell curve. If you want to recreate a true "normal distribution" please refer to your statistical manual. It will provide the correct values for each instance of each data point.

Please don't ask for a translation to Visual Basic. My simulanteous linear equation capacity is a bit rusty and I had hoped I wouldn't have to perform a "refresh" before I die.

Best of luck. Hack it first. If that doesn't work, prepare to spend a few months in the trenches.
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Alt,

Thanks for the sympathy bit. I too would prefer to not revisit some of the statstical functions (and their derivations).

I don't believe NevG was asking for the math/translations, as he states " ... but cant produce a bell diagram."

NegV, I have done this often - by sending the data to "Excel" and having Excel do the actual charting. Probably just lazy, but I never did get around to being able to print graphic charts from VB.

My general approach was to setup a named range in the excel workbook on some sheet and the chart on another sheet. (To make sure the chart/graph is correct, I put in some known/dummy data and generate the test chart.) From VB, just fill in the named range with the values. With recalc set on, tevery time you open the workbook, the chart is up to date. Excel will take care of any printout necessary w/o and code at all.

I'm sure that just activating MS Chart from with in VB would work just as well for screen presentation
MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Awww, Michael, I thought I was being a super-hero by suggesting the average random simulation. And there you go suggesting a practical solution....

<grumble> I should have stayed in school for ten more years. I might have learned to tie my shoes without busting my head on the doorknob. (BTW, It happens every morning.)
VCA.gif

Alt255@Vorpalcom.Intranets.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top