I've been learning machine learning, and I've heard that one of the questions to think about when doing machine learning is whether the past (known) data is representative of the future/generalizes well into the future. I've heard that neural networks will work better with this kind of data than data without this property. How exactly do you determine if the data generalizes well?
One thing I've learned in statistics that may be able to do this is when looking for correlation between variables and calculating the p-value of their correlation. If the p-value of this statistic is low and the correlation is considered statistically significant, then it is likely that this statistic did not come about by chance. I was thinking that if this is the case between two variables, then maybe there is a function that could represent their correlation, and thus these two variables might generalize well in the future. Is this line of thought correct?
Also, are there other ways of determining if the data generalizes well?