c# - Function to approximate skewed distribution of range of values? -


i need write function return ienumerable> each tuple represents each member of generated range along corresponding probability approximate probability on skewed distribution.

i envision function signature of:

ienumerable<tuple<double, double>> skewedrange(double min, double max, double mean, double step = 1.0) 

for example, range between 1.0 , 10.0 mean 2.3 , default step 1.0, want list of values so:

item1  item2  histogram (for demo only) 1.0    p1     ***** 2.0    p2     ********* 3.0    p3     ******* 4.0    p3     ***** 5.0    p3     *** 6.0    p3     ** 7.0    p3     ** 8.0    p3     * 9.0    p3     * 10.0   p10    * 

the resulting graph of these values resemble skewed distribution peak between 2-3.

questions:

  1. is feasible. if so, on scale of 1 5 how difficult implement.
  2. are there open source libraries utilized or implement this.
  3. any resources knows of me understand problem domain. have done significant amount of research on already, heavy in statistic theory equations using notation difficult non-statistician consume less codify.
  4. anything else not considering here?

what asking sample distribution truncated given range , has mode (greatest density) in range.

i'll assume doesn't matter what's distribution. assume truncated normal distribution ok.

let , b numbers. these describe bump. let c , d other numbers. these specify range.

let x random sample normal distribution mean 0 , variance 1. there function in c# don't know might named. + b x normal, mean , variance b^2.

if + b x between c , d, output 1 sample. otherwise try again until number between c , d.

you can vary a, b, c, , d , see get. hope helps.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -