# Interval distribution

• Hello, everyone!

Is there a question as to the ways in which a number is unevenly distributed at a certain interval and how is it done? Suppose there's a 1-day interval (24 hours: 0.24) and there's a 50, a minimum distribution interval of 1 hour.

In fact, if an equal distribution is made, 50/24 is sufficient and the number is set for each hour. There will be a straight line where 2.08 or x/24 are available each hour, growing every hour.

The challenge is that I need to unevenly distribute a number at intervals. Let's say I have a task-delivery system, she has a fixed number every day (e.g. 150 tasks), a method should be used to dispel these tasks unevenly (the distribution pattern is not yet known, but in fact should be a reminder of user activity on the Internet in the course of the day). Let's say:

(1) 10 per cent from 0 to 5

(2) 30 per cent from 5 to 10

(3) 40 per cent from 10 to 20

(4) 20 per cent from 20 to 24

The essence of these numbers is not important, for example. It's clear that you can do it with interest and time control, but there may be some smarter way, with cos, sin, Guuss' function.

In fact, I want to report functions, which are now, for example, 12 hours of the day, and so much has been done, and I will return what remains to be done from the total to the.

I'll be grateful to any advice, from the references to all the lessons to the explanations.

• This operation is called linear interpolation. The formula is:

``````y = a * x1 + (1.0 - a) * x2
``````

where `x1` and `x2` - two values, minimum and maximum, a `a = [0..1]` - Interpolation factor.

This task is required `x1 = min(x)``x2 = max(x)` and distribution function `a = a(t)`where `t` - it's time.

2

2

2

2

2

2

2

2

2

2

2

2

2

2

2