Cor(x,y) function(I don't know if this is useful)

  • Thread starter greggory
  • Start date
In summary: So, every step, n will increase by 1, and the expression will be sqr(x / ny). After n is increased, you will still get 0, no matter how high n is.In summary, the conversation was about a computer science homework assignment involving creating a sequence with given coordinates and expressions. The result of repeating this sequence was plotted on a coordinate plane, resulting in an isosceles triangle. The code used for this was also provided. The conversation then delved into the possibility of using different equations within the sequence, and the relationship between x and y values. The conversation ended with the poster requesting for a response and providing additional information about an equation and its meaning.
  • #1
greggory
14
0
So, I was working on computer science homework, and I decided that I would make a sequence, where there would be a coordinate given, such as (4,6), and there would be a given set of expressions, which are x = y/x and y = x/y, then you would repeat this. Now, what got me interested in this is when I repeated this over and over again, the coordinates would repeat. Then, I plotted the points on a coordinate plane, and this is what I got with, for example (3,3), which got me an iscoceles triangle.

http://img23.imageshack.us/img23/4966/triangled.png

Which, then, with this method, I made a theorem that if both the x and y value are equal to each other and are larger than 0, then the formed triangle will always have two congruent sides.

I don't know if this is useful or has already been done before, so this is just an interesting find.
 
Last edited by a moderator:
Mathematics news on Phys.org
  • #2
greggory said:
x = y/x and y = x/y, then you would repeat this.

It isn't clear what you mean by "repeat this". If you began with (3,3) then x = 3/3 = 1 and y = 3/3 = 1. If we perform the same process on (1,1) we get (1,1) again. It isn't clear what you graphed.
 
  • #3
I'd be interested to learn what you did if you found a sequence which somehow produced an isosceles triangle, but like Stephen said I can't figure out what you did.

Can you post the code you wrote or write explicitly how you defined the sequence?
 
  • #4
I must have not explained well enough. Sorry about that.

Here is the code that loops:

Code:
x = y / x*10;
y = x / y*10;
instance_create(x*10,y*10,object0);
alarm[0] = 15;

//In this code, create a point object that will show the 
//coordinates of the points.

From this image shown:

http://img811.imageshack.us/img811/8404/proofqj.png

If you were to use the Distance formula, you would get two segments with the distance of 311.28, while the last segment's distance is 329.98, which in proof form, would be that AB = AC by the Distance Formula.

Also, I ran some more tests, and I noticed that isosceles triangles only form with this sequence when both the x and y coordinate are equal.
 
Last edited by a moderator:
  • #5
bump - Sorry, I really need a response.
 
  • #6
Anyone? I need assistance here.
 
  • #7
Is anyone not even visiting this topic? Bump.
 
  • #8
Let the initial point be ( x[n],y[n]) with x[n] = y[n] = A

After the execution of the two steps, the point is (10, 100/A)

After another execution of the two steps, the point is (100/A, 10)

So the x and y values are interchanged. Interchanging the (x,y) and y values of a point is the same as "reflecting the point" about the line y = x.
It isn't surprising that that a point (A,A) which lies on the line y = x forms an isoceles triangle with a point (x,y) and the reflection of that point about y = x.
 
  • #9
Is it suprising that that by increasing the x value by 1, or even any number, would always result in this same pattern?
http://img442.imageshack.us/img442/418/newuw.png

For any x and y value, you will always get the result of this triangle. Also, depending on the equation you use, the value after words will always be the same, such as if every step you were to do the square root of x + y / 2, you will always receive the value of 11.91 if you increase x by 1.
 
Last edited by a moderator:
  • #10
greggory said:
bump - Sorry, I really need a response.

greggory said:
Is anyone not even visiting this topic? Bump.
Bumping like that is a sure way to get yourself banned.

In any case, what kind of response do you expect?

x = y / x*10;
y = x / y*10;
For this to compile x and y will have to have been defined separately. What are they?

instance_create(x*10,y*10,object0);
What is "instance_create(X,Y,Z)"?

alarm[0] = 15;[/quorte]
What does this do? What is its purpose?
 
  • #11
Sorry, I thought the rules said you could bump after 24 hours.

I expected a response to say whether it was something interesting, for this is the General Math section.

X and Y are the coordinates on the coordinate plane, if I already said that(I might have not though)

The rest of the code is not important, for it is just for putting the points on the coordinate plane.

Now, I really want a response. Every topic I make, they are always ignored.

EDIT: Here is an equation I left out:

http://img20.imageshack.us/img20/3619/equationb.png

Here is what the equation means. In the equation, as easily pointed out, the resulting outcome will equal 0. Now, in the equation, we first get the coordinates, or x and y, from the newly given point. After being given the newly given point, which is the result of cor(x,y) with increasing the x value, you enter it into the expression sqr(x / ny), which n is the variable that increases by 1. And, the result will be 0.

The fastest way(or faster) to calculate the number to 0 would be to instead have n = n+n, being n equaled 1 in the first place.
 
Last edited by a moderator:

1. What is the purpose of the Cor(x,y) function?

The Cor(x,y) function is used to calculate the correlation coefficient between two variables, x and y. This coefficient measures the strength and direction of the linear relationship between the two variables.

2. How is the Cor(x,y) function calculated?

The Cor(x,y) function uses a mathematical formula to calculate the correlation coefficient. This formula takes into account the individual values of x and y, as well as the mean and standard deviation of each variable.

3. What does a correlation coefficient of 0 mean?

A correlation coefficient of 0 indicates that there is no linear relationship between the two variables. This means that there is no consistent pattern or trend between the values of x and y.

4. What is the range for the correlation coefficient?

The correlation coefficient can range from -1 to 1. A value of -1 indicates a perfect negative correlation, meaning that as one variable increases, the other decreases. A value of 1 indicates a perfect positive correlation, meaning that as one variable increases, the other also increases. A value of 0 indicates no correlation.

5. How is the correlation coefficient interpreted?

The correlation coefficient is interpreted as a measure of the strength and direction of the linear relationship between two variables. A value close to -1 or 1 indicates a strong relationship, while a value close to 0 indicates a weak relationship. The sign of the correlation coefficient indicates the direction of the relationship (positive or negative).

Similar threads

Replies
2
Views
1K
Replies
2
Views
680
  • General Math
Replies
3
Views
1K
Replies
1
Views
794
Replies
1
Views
832
Replies
1
Views
3K
Replies
9
Views
1K
Replies
1
Views
2K
Replies
2
Views
1K
Back
Top