Looking for a good way to distribute n numbers in the region [0,1]

  • Context: Undergrad 
  • Thread starter Thread starter mikeph
  • Start date Start date
  • Tags Tags
    Numbers
Click For Summary
SUMMARY

This discussion focuses on distributing n real numbers within the range [0,1], specifically determining the spacings between adjacent numbers. The simplest method is equal spacing, where S(1) = S(2) = ... = S(n-1). For non-uniform distributions, the discussion explores linear increases defined by S(i+1) = 2*S(i) and sinusoidal distributions using arcsin transformations. The arithmetic series formula is applied to derive expressions for the increments, leading to specific calculations for d and e, which define the series of numbers.

PREREQUISITES
  • Understanding of arithmetic series and their properties
  • Familiarity with basic calculus concepts, particularly sinusoidal functions
  • Knowledge of mathematical notation and equations
  • Ability to manipulate algebraic expressions and solve equations
NEXT STEPS
  • Research "Arithmetic series and their applications" for deeper insights into series calculations
  • Explore "Non-linear distributions in statistics" to understand various distribution methods
  • Learn about "Transformations of functions" specifically focusing on sinusoidal transformations
  • Investigate "Numerical methods for solving equations" to apply these concepts in programming
USEFUL FOR

Mathematicians, data analysts, and anyone interested in numerical methods for distributing values within a defined range will benefit from this discussion.

mikeph
Messages
1,229
Reaction score
18
So say I have n real number to chose in the range [0,1], and the first and last are 0 and 1. So in essence my problem is to determine the n-1 spacings between adjacent numbers, so call these values S(1), S(2), ... S(n-1).

The simplest would be an equal spacing: S(1) = S(2) = ... = S(n-1). For example, n=11, then all the spacings are 0.1.

Is there a good formulation for generalising this to non-uniform spacings?

For example, I want to consider:

1. Linear increase: S(i+1) = 2*S(i) (which to me looks like n-2 equations for n-1 unknowns- how to determine s(1)?)

Or also any other interesting ways of distributing the numbers, for example sinusoidally: taking the equal spacing example above, then taking the arcsin of each point from 0 to 1 to get a squashed distribution in [0,pi/2] then dividing by pi/2 to return to the [0,1] range.



Is there any easy way to express this? I am just writing ramblings on paper and for all I know this has a name or something I can research.

Thanks,
Mike
 
Mathematics news on Phys.org
Oh, just noticed for the first problem,

The sum should equal 1, so

S(1) + 2*S(1) + 4*S(1) + ... + 2^(n-1))*S(1) = 1
so
s(1)*(2^(n-1) - 1) = 1?
 
It seems like a pretty simple application of arithmetic series Mikey. Let the initial increment be "d" and the increase in the increment be "e". Then the (n-1) increments are :

d, d+e, d+2e, d+3e ... d+(n-2)e

Using the above and applying the arithmetic series formula you can express the n sample points as:

0, d, 2d+e, 3d+3e, 4d+6e, ... kd+k(k-1)/2 e, ... (n-1)d + (n-1)(n-2)e/2

Since you want the last increment to be twice the first then :

[tex]d + (n-2)e=2d[/tex]

Which gives,

[tex]e=\frac{d}{n-2}[/tex]

Also since the last term in the series is 1 you need :

[tex](n-1)d + (n-1)(n-2)e / 2 = 1[/tex]

Which gives,

[tex](n-1)d + (n-1)d/2 = 1[/tex]

[tex]d = \frac{2}{3(n-1)}[/tex]

Example : n=4

d=2/(3(n-1)) = 2/9, and e=d/(n-2)=1/9

So the series is : [0, 2/9, 5/9, 9/9] which seems to work ok. :)
 
Last edited:

Similar threads

  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 55 ·
2
Replies
55
Views
7K
  • · Replies 15 ·
Replies
15
Views
4K