From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-03-2013 09:54 AM
You are mixing the wrong theory. We are dealing with probability theory. It has nothing to do with number theory. Terminolgy in certain subject is key in talking about this. Clustering you are talking about is not necessarialy inherent.
09-03-2013 09:58 AM
Of course 5 numbers will have a mean of .2.
Now you have to define what you mean by variance, and what you call high and what you call low.
Is your variance value based on standard deviation? root sum square, root mean square? Some other calculation of the results?
I don't know if you'll be able to force your random number generation to conform to your requirements. I think you'll have to generate a set, calculate your variance by whatever the definition is. If it passes your criteria, proceed. If it fails, then generate another set and test the criteria again.
09-03-2013 10:13 AM
Thank you guys, I don't know which one I can consider as the best solution, Special thanks to RavenFan, he gave me a very nice inspiration and to altenbach who gives me the set that I want, I am satisfied with the generated numbers although I can find in which mathematical theory it is based (1/xi2)/(sum(1/Xi2)).
09-03-2013 10:18 AM
@ziedhosni wrote:
... although I can find in which mathematical theory it is based (1/xi2)/(sum(1/Xi2)).
There is no theory. It just creates a set of random numbers with a non-even probability distribution to be normalized to a sum of 1.
09-03-2013 10:19 AM - edited 09-03-2013 10:20 AM
nevermind, already answered
09-03-2013 11:14 AM
If we're talking really random numbers with those constraints, there is no certainty that their variance will be high. You could have two random sets (of course I picked these, but they have just as high a probability of happening as any other):
0.990, 0.001, 0.002, 0.003, 0.004 (s^2 = 0.195)
0.198, 0.199, 0.200, 0.201, 0.202 (s^2 = 0.00000250)
And as long as the OP hasn't constrained the set to exclude duplicates:
1.00, 0.00, 0.00, 0.00, 0.00 (s^2 = 0.2) maximum possible
0.20, 0.20, 0.20, 0.20, 0.20 (s^2 = 0) minimum possible
And don't tell me that these can't exist. I saw someone throw 4 boxcars (6-6) in a row at the craps table one night (probability 1,679,616 to 1 against), although nobody had the courage to bet on it and let it ride (for non-gamblers, that means bet your winnings from one roll on the next).
Cameron
09-04-2013 03:42 AM
Actually my previous text was not displayed. I wanted to show you for interested people the VI I coded. Is there any critic or comment?
09-04-2013 07:38 AM
Except for the fact that it will never reach a conclusion which satisfies your stated criteria, since there is no way that you'll get a standard deviation of 0.99 (or anything above 0.142857... for seven numbers) with seven elements adding up to 1.0, you have succeeded in wiring up a random number generator which indicates when the sum of a chosen number of numbers is less than 1.
Cameron