如何在VB.net中制作钟形曲线 [英] How to make a bell curve in VB.net

查看:32
本文介绍了如何在VB.net中制作钟形曲线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个构建直方图的程序,我想根据我从工程中获得的目标添加一个代表理想曲线的钟形曲线.

I have a program that builds a histogram chart and I want to add a bell curve that represents the ideal curve based on the goal I got from engineering.

这是一张快照,让您了解我正在使用什么.

here is a snapshot to give you an idea of what im working with.

我将秒格式化为表示 hh:mm:ss.

I formatted the seconds to represent hh:mm:ss.

在这个例子中:
垃圾箱:20
目标:672秒
分钟:120 秒
最长:1200 秒

In this example:
bins: 20
the goal: 672 seconds
min: 120 seconds
max: 1200 seconds

如何为上述标准绘制理想曲线?

How can I plot the ideal curve for the criteria above?

一旦我弄清楚了,红线最终会弯曲.

the red line will eventually be curved once I can figure this out.

推荐答案

理想"曲线,我假设您指的是高斯密度.如果这不是您的意思,则您必须更新问题陈述以清楚说明您的意思.

By "ideal" curve, I'll assume you mean a Gaussian density. If that's not what you mean, you'll have to update the problem statement to say clearly what you mean.

鉴于此,只需找到数据的均值和标准差(最好在分箱之前,尽管之后是可以的;我怀疑它是否有很大差异)并绘制高斯密度(p(x)= exp(-(1)/2) * ((x - mu)/sigma)^2)/(sigma * sqrt(2 pi))) 其中 mu = 平均值,sigma = 标准偏差.我假设您可以列出点并为任何给定的公式绘制它们.

Given that, just find the mean and standard deviation of the data (preferably before binning, although afterward is OK; I doubt if it makes much difference) and plot a Gaussian density (p(x) = exp(-(1/2) * ((x - mu)/sigma)^2)/(sigma * sqrt(2 pi))) where mu = mean and sigma = std deviation. I assume that you can make a list of points and plot them for any given formula.

这篇关于如何在VB.net中制作钟形曲线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆