# What is the minimum number of data to create a function?

I gonna introduce the problematic like this:

Let's say there are individuals with different capacities/skills. These capacities/skills are depending of the environment: nature of the floor, weather temperature, wind speed. The capacity/skill I want to study is the speed of the individuals considering the environment.
As you know, speed is depending of the distance, not only because of the formula distance/time unit, but because even Usain Bolt cannot reproduce the same speed for the 100m and 200m discipline, actually his mean speed decrease with the distance, with environment's variables as constants. This is why I cannot just look at the mean speed itself to conclude if it is more adapted or not
So, because factors are variable/do change, I want to isolate with marginal effect, and conclude what nature of the floor is better for this individual to perform, what distance is better to perform too (Usain Bolt is not done for endurance...). To do it, I want to use a linear regression, this is more simple to derivate.

The main issue is my data has not always a lot of historic. This is often that there are no more than 5-6 previous experiences.

So, when I was younger in high school, there were a rule of thumb telling we need a least 5 points to make a function (with OLS). Know that I am older and have more experience, I doubt of this small threshold. But I have not enough experience to know what really could be this threshold. Do you have any idea ?