Correlation of variable to squared variable If I have a certain variable, let's say Age. Then why if I square this variable, is the correlation between $age$ and $age^2$ not equal to 1. e.g. I get a correlation coefficient of 0.983. is this something structural or does it depend on my data somehow?
Thanks!
 A: This is because for a perfect correlation you need a linear relationship between your two variables i.e. if we see an increase in $X$ of size $a$ we will see exactly an increase in $Y$ of size $b$.
By squaring the variable you no longer have a linear relationship but a quadratic one. The effect is very clear to see when you start going into higher powers.
Code and graph for square relationship overlaid with linear regression line:
library(tidyverse)
dat <- data_frame(
    age = runif( 100 , 20 , 80),
    age2 = age^2
)
ggplot( dat , aes(x = age , y = age2)) + 
    geom_point() +
    geom_smooth( method = "lm" , se  = F)


Code and graph for age ^ 6
library(tidyverse)
dat <- data_frame(
    age = runif( 100 , 20 , 80),
    age6 = age^6
)
ggplot( dat , aes(x = age , y = age6)) + 
    geom_point() +
    geom_smooth( method = "lm" , se  = F)


EDIT: This is true of Pearson correlation. If you use other methods such as Spearman correlation that relies on the ranking of data then you will still get a perfect correlation of 1 even after the square transformation as the ranks have been preserved. 
A: The correlation will depend on the distribution. For instance, see my answer to a similar question that shows that for symmetrical distributions the correlation will be zero.
It's very easy to see how, look at the picture below. The line $y=x$ and curve $y=x^2$: on positive x they go together, and on negative x they go in opposite directions. So, if you have a symmetric distribution such as Gaussian on $x\in\mathbb R$, entire real line, then the correlation will be precisely zero.
However, if you only look at the positive side, i.e. $x>0$, then the correlation will be very high on almost any distribution.

So, it's not just the functional form, it's also the underlying distribution of your data
