To be able to generalize your results from the smaller sample to the larger population, you must select the appropriate sample of subjects. Ideally you want to have a random sample. In a random sample, each individual in a population has an equal opportunity of being selected as a subject. The sample should represent the population the sample should closely match the characteristics of the population. The relationship may be causal or it may be just be correlational.
Causal relationships exist when one variable directly or indirectly influences another.
In correlational relationships, changes in one variable tend to be associated with changes in another, but tests have not been conducted to show that one variable actually influences the other. All we know is that a relationship exists. There is a correlation, but not a causal relationship. Need to be careful in accepting validity of studies that show a correlation, without evidence that there is causation.