Assume I have value $x=500$. I would like to apportion this value $500$ across $24$ hours time period and would like it to be apportioned randomly. So if $500$ is $100\%$ the $x\%$ generated at random would be used to apportion the value of $X$ into $24$ segments. Any help?
Asked
Active
Viewed 64 times
0
-
What is the minimum and maximum segment size? – barak manos Aug 13 '15 at 05:29
-
There is no min and maximum. Actually 24 is the number of hours. I have aggregated value for a day which I want to apportion it across 24 hours. – Siva Karthikeyan Aug 13 '15 at 05:31
-
So one segment can be $0$ or $500$? – barak manos Aug 13 '15 at 05:32
-
It can be 0 but not 500. – Siva Karthikeyan Aug 13 '15 at 05:33
-
1Well??? So there IS a maximum limit!!! What is it? $499$? – barak manos Aug 13 '15 at 05:34
-
Wow!! You'r right. I'm sorry now I get it,it cannot go beyond 10% value of X. – Siva Karthikeyan Aug 13 '15 at 05:37
-
Let us continue this discussion in chat. – Siva Karthikeyan Aug 13 '15 at 05:43
1 Answers
1
Make a list of $23$ random numbers between $0$ and $500$ inclusive. Append $0$ and $500$ to the list, and sort it. Each hour's allotment is the difference between two adjacent numbers in the sorted list. (This rule allows both $0$ and $500$; excluding $500$ is a bit trickier.)
Roby5
- 4,287
Anton Sherwood
- 628
-
I'm not convinced that putting numbers in TeX makes them significantly more legible. – Anton Sherwood Apr 10 '16 at 23:17