久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

C# 普通隨機(jī)數(shù)

C# Normal Random Number(C# 普通隨機(jī)數(shù))
本文介紹了C# 普通隨機(jī)數(shù)的處理方法,對(duì)大家解決問(wèn)題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!

問(wèn)題描述

我想創(chuàng)建一個(gè)接受雙均值雙偏差并返回一個(gè)正態(tài)分布的隨機(jī)數(shù)的函數(shù).

I would like to create a function that accepts Double mean, Double deviation and returns a random number with a normal distribution.

例如:如果我傳入 5.00 作為平均值和 2.00 作為偏差,68% 的時(shí)間我會(huì)得到一個(gè)介于 3.00 和 7.00 之間的數(shù)字

Example: if I pass in 5.00 as the mean and 2.00 as the deviation, 68% of the time I will get a number between 3.00 and 7.00

我的統(tǒng)計(jì)數(shù)據(jù)有點(diǎn)弱......任何人都知道我應(yīng)該如何處理這個(gè)問(wèn)題?我的實(shí)現(xiàn)將是 C# 2.0,但只要數(shù)學(xué)函數(shù)是標(biāo)準(zhǔn)的,就可以用您選擇的語(yǔ)言回答.

My statistics is a little weak…. Anyone have an idea how I should approach this? My implementation will be C# 2.0 but feel free to answer in your language of choice as long as the math functions are standard.

我認(rèn)為這個(gè)實(shí)際上可能成為我正在尋找的東西.任何幫助將其轉(zhuǎn)換為代碼?

I think this might actually be what I am looking for. Any help converting this to code?

預(yù)先感謝您的幫助.

推薦答案

參見這篇 CodeProject 文章:簡(jiǎn)單的隨機(jī)數(shù)生成.代碼很短,可以從均勻分布、正態(tài)分布和指數(shù)分布中生成樣本.

See this CodeProject article: Simple Random Number Generation. The code is very short, and it generates samples from uniform, normal, and exponential distributions.

這篇關(guān)于C# 普通隨機(jī)數(shù)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問(wèn)題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Is there a C# library that will perform the Excel NORMINV function?(是否有執(zhí)行 Excel NORMINV 函數(shù)的 C# 庫(kù)?)
Select x random elements from a weighted list in C# (without replacement)(從 C# 中的加權(quán)列表中選擇 x 個(gè)隨機(jī)元素(無(wú)需替換))
Recommend an Open Source .NET Statistics Library(推薦一個(gè)開源的.NET統(tǒng)計(jì)庫(kù))
Create a summary description of a schedule given a list of shifts(給定輪班列表,創(chuàng)建時(shí)間表的摘要描述)
Standard deviation of generic list?(通用列表的標(biāo)準(zhǔn)偏差?)
AsyncCTP: Creating a class that is IAwaitable(AsyncCTP:創(chuàng)建一個(gè) IAwaitable 的類)
主站蜘蛛池模板: 欧美日韩视频在线第一区 | 亚洲精品免费视频 | av在线视 | 亚洲小视频 | 奇米影视在线 | 日韩欧美一区二区三区 | 福利视频二区 | 中文字幕一区二区三区四区五区 | 亚洲综合一区二区三区 | 在线观看三级av | 日韩欧美在 | 色精品 | 成人高清在线 | 老司机免费视频 | 国产精品久久久久久久7777 | 久操亚洲 | 精品亚洲一区二区三区 | 黄视频免费 | 午夜精品久久久久久久久久久久久 | 久草视| 欧美1页| 日韩在线视频观看 | 欧美日韩一区二区在线观看 | 国产精品成人一区二区三区 | 激情网站| 黑人成人网| 欧美午夜激情在线 | 丁香综合 | 成人免费视频 | 成人影院在线 | 91久久夜色| 国产一二区视频 | 九色在线 | 高清欧美性猛交 | 日本精品一区二区 | 91福利网 | 欧美久久久久 | 福利网址 | 亚洲国产视频一区二区 | 一级免费毛片 | 成人不卡视频 |