Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
ramana
 
Posts: n/a
Default Random numbers generation with conditions.

Hi everybody,


I want to generate "n"(say24) number of random numbers between a
specified range(say between 50 & 40) with two conditions such that the
average should be "X"(say 44.56) and with a standard deviation "X1"(Say
3.21).

Can anybody helpme out to solve this problem.

Thanks and Best Regards

Ramana

  #2   Report Post  
bj
 
Posts: n/a
Default

use norminv() to generate your distirbution
=norminv(rand(),44.56,3.21)

see Help for more info.

"ramana" wrote:

Hi everybody,


I want to generate "n"(say24) number of random numbers between a
specified range(say between 50 & 40) with two conditions such that the
average should be "X"(say 44.56) and with a standard deviation "X1"(Say
3.21).

Can anybody helpme out to solve this problem.

Thanks and Best Regards

Ramana


  #3   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default

Hi Ramana,

If you want the average and standard deviation to be exactly equal to the
values you specify (say 44.56 and 3.21 respectively), you may try this
approach.

Generate "n" (say 24) random numbers (say between 40 and 50) using,
=RAND()*10+40 in say A2:A25. Have helper cells created for the required
average (say in B2), the required standard deviation (say in B3), the actual
average (say in C2), and the actual standard deviation (say in C3).

Now launch the 'Solver',
'Set Target Cell' -- $C$2,
'Equal To' -- select the 'Value of' button, and enter 44.56 in the bar,
'By Changing Cells'--$A$2:$A$25 (for example)
'Add' the constraint -- $C$3 = $B$3,
'Solve', 'OK'

Once the random numbers are optimized to conform to the constraints, they
lose their formula and change into mere values. Please note that these
numbers of course are uniform random numbers (and not gaussian random
numbers) as expected of the =RAND() function.

Regards,
B. R. Ramachandran




"ramana" wrote:

Hi everybody,


I want to generate "n"(say24) number of random numbers between a
specified range(say between 50 & 40) with two conditions such that the
average should be "X"(say 44.56) and with a standard deviation "X1"(Say
3.21).

Can anybody helpme out to solve this problem.

Thanks and Best Regards

Ramana


  #4   Report Post  
ramana
 
Posts: n/a
Default

Hi,

Thank you for the information given Now I'm trying to apply to this
for my sprcific problem.

Thanks and Regards

Ramana


B. R.Ramachandran wrote:
Hi Ramana,

If you want the average and standard deviation to be exactly equal to the
values you specify (say 44.56 and 3.21 respectively), you may try this
approach.

Generate "n" (say 24) random numbers (say between 40 and 50) using,
=RAND()*10+40 in say A2:A25. Have helper cells created for the required
average (say in B2), the required standard deviation (say in B3), the actual
average (say in C2), and the actual standard deviation (say in C3).

Now launch the 'Solver',
'Set Target Cell' -- $C$2,
'Equal To' -- select the 'Value of' button, and enter 44.56 in the bar,
'By Changing Cells'--$A$2:$A$25 (for example)
'Add' the constraint -- $C$3 = $B$3,
'Solve', 'OK'

Once the random numbers are optimized to conform to the constraints, they
lose their formula and change into mere values. Please note that these
numbers of course are uniform random numbers (and not gaussian random
numbers) as expected of the =RAND() function.

Regards,
B. R. Ramachandran




"ramana" wrote:

Hi everybody,


I want to generate "n"(say24) number of random numbers between a
specified range(say between 50 & 40) with two conditions such that the
average should be "X"(say 44.56) and with a standard deviation "X1"(Say
3.21).

Can anybody helpme out to solve this problem.

Thanks and Best Regards

Ramana



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Non-random numbers generated by excel's data analysis random gener Allie Excel Worksheet Functions 10 September 17th 05 06:19 AM
Non-random numbers generated by excel's data analysis random gener Harlan Grove Excel Discussion (Misc queries) 2 September 13th 05 04:06 PM
random numbers from a data of numbers? MaryEng Excel Worksheet Functions 6 May 31st 05 12:09 PM
Validating random numbers plsauditor Excel Worksheet Functions 2 January 11th 05 11:12 PM


All times are GMT +1. The time now is 06:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"