LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

About Binomial noise VI

Hi,

 

I am using LabView vs 2010 version 10.0.1 and I would like to know the exact algoritm used by the vi  BINOMIAL NOISE VI to generate the binomial noise.

 

Best regards

0 Kudos
Message 1 of 5
(3,237 Views)

For less than 25 trials it simply uses the brute force method, generate a random number between 0 and 1 for each trial, compare it to the trial probability and count the number of times the random number < trial probability.

 

For 25 or more trials it gets interesting.  The usual performance test, and often the fingerprint, of the method is the number of random values which are generated per binomial (or whatever) deviate.  Most versions require an even number of random numbers because they are selected and tested in pairs.  Some can accept or reject with the first value before generating the second so odd values including 1 are possible.

 

My personal version selects the random values in pairs so the number of random numbers is always even.  The average values of random numbers/binomial deviate tend to lie between 2.1 and 3.8, typically around 3.something depending on the values of trials and trial probability.

 

Checking out the LV version I find values that lie between 1.1 and 5.4.  It is clearly different than mine since there are odd values and average values < 2, so I can't fully pin down the algorithm yet.  Two things are that it seems to be non-standard (or a tweaked standard version), and that it seems to be a bit clunky (requires more random numbers).

 

My advice is to do what I did, roll your own.  It is not really that hard and you know all of the details.  OR, just don't care and take your chances.

 

0 Kudos
Message 2 of 5
(3,214 Views)

If you can't open the VI to look at the block diagram, you're unlikely to ever find out the exact diagram.  Darin handled your options pretty well:

 

1) Make your own

2) Work with the tool provided

 

If you absolutely need to know how it's working, you'll need option 1. 

0 Kudos
Message 3 of 5
(3,205 Views)

thank you very much for your answer.

0 Kudos
Message 4 of 5
(3,067 Views)

yes, probably i'll do that.

 

thank you

0 Kudos
Message 5 of 5
(3,066 Views)