The Congressional Budget Office released a letter discussing the impact of preventive services on health care costs. This section in a blog post about the letter is illustrative:
That result may seem counterintuitive. For example, many observers point to cases in which a simple medical test, if given early enough, can reveal a condition that is treatable at a fraction of the cost of treating that same illness after it has progressed. But when analyzing the effects of preventive care on total spending for health care, it is important to recognize that doctors do not know beforehand which patients are going to develop costly illnesses. To avert one case of acute illness, it is usually necessary to provide preventive care to many patients, most of whom would not have suffered that illness anyway. Judging the overall effect on medical spending requires analysts to calculate not just the savings from the relatively few individuals who would avoid more expensive treatment later, but also the costs of the many who would make greater use of preventive care.
This is a very straightforward use of an expected value equation - take the number of patients likely to have an illness and multiply it by the difference between treatment costs for progressed illness and treatment costs for early identification. This total number is then compared with the costs for testing for the illness across a large population where only a fraction have the illness.
A good example of the application is hard drive encryption. I remember a few years ago hearing folks say that it only costs $100 per laptop (or something like this - I don't recall the real number offhand) to save breach costs that amount into the tens or hundreds of thousands of dollars.
The proper way to evaluate this is to compare the total costs for encryption to the number of laptops expected to be compromised times the expected losses. I still believe this is a win for encryption, but the analysis needs to be appropriate to ensure there aren't cases where you are spending too much money for 'preventive care.'