#11




Re: *ANSWER* Stuck on #4
Quote:
Juan 
#12




Re: *ANSWER* Stuck on #4
One absurdly simple way to get a handle on the plausibility of the result all of us doubted is to see what the range of possible slopes is, and guess it might be near the middle.
Observe that if two points are very near the origin, the slope can be but no higher. If they are at the furthest extremes, the slope can be zero, but no lower. The mean of this range of possible slopes is 1.57. 
#13




Re: *ANSWER* Stuck on #4
I have simulated 100K points using this formula for slope and taken the average. I have run this a number of times but each time I get a different slope all of which are small numbers like +/ 0.00X
The random points (x1, y1) and (x2, y2) I generated are all between 1 and 1. Is the slope I am getting small because the random numbers are between 1 and 1? After all, I am dividing by 100K. Here's the code double slope = ((x1*y1) + (x2*y2)) / ((x1*x1) + (x2*x2)); I sum the slopes for each point and compute average AverageSlope = SumSlope / (double) NoOfPoints; 
Thread Tools  
Display Modes  

