Message Boards Message Boards

0
|
49 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Define two lists with a correlation of -1

Posted 14 hours ago

Hi,

How do I define two lists with a correlation of -1 (r=-1)? Many thanks for your time. Alex

In[19]:= data = {4, 10, 50}

Out[19]= {4, 10, 50}

In[24]:= data1 = 1/data

Out[24]= {1/4, 1/10, 1/50}

In[23]:= Correlation[data, data1]

Out[23]= -0.83795
POSTED BY: Alex Teymouri
2 Replies
In[1]:= data = {4, 10, 50}

Out[1]= {4, 10, 50}

In[2]:= data1 = -data

Out[2]= {-4, -10, -50}

In[3]:= Correlation[data, data1]

Out[3]= -1
Posted 8 hours ago

Thank you, Valeriu.

POSTED BY: Alex Teymouri
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract