Scientists look for patterns in data.
Research has established links between cancer and various lifestyle factors, chemicals produced in the human body, or that enter the body and chemicals in the environment. If these factors are linked to the development of a disease they are called 'risk factors'. An obvious risk factor for lung cancer is smoking.
Below is an example of how risk factors have been found. This has come from studies on smoking cigarettes and lung cancer.
Historically, in the USA, a pattern can be seen between the number of cigarettes smoked and the number of lung cancer deaths.
As the number of cigarettes smoked has increased over the years, the incidence of lung cancer has increased also. Note that there is a time-lag, but cancer usually takes some years to develop.
There is a clear association, called a correlation, between the variables. Scientists have found correlations to link risk factors to cancer and other non-communicable diseases.
If there is a correlation between a particular factor and an outcome, it does not mean that the factor necessarily causes the outcome. Scientists must look for a possible mechanism by which the factor could be the likely cause.
In the case of lung cancer, analysis of cigarette smoke has shown that at least 70 of the chemicals present in smoke will cause cancer in laboratory animals, which establishes a causal link.