Possibly the earliest study into the effectiveness of prayer comes from the Englishman, Francis Galton (1872) in his article entitled Statistical Inquiries into the Efficacy of Prayer. In this report, the author cited his own examination of the data of life expectancies of clergy and members of the royal houses, both of whom were assumed to pray more than the general population and to be supported more through intercessory prayer than anyone else. However, the study results indicated the opposite trend with physicians and lawyers outlasting clergy, and missionaries not living any longer than commoners.
While this study presumes that prayer is the mediating factor in the length of life, it is more of an epidemiological study pointing to the difficulty of assigning correlation and causation in research. The assumption made of the main differences between groups being the amount of prayer and then linking this assumption to the conclusion that prayer is ineffective is shortsighted. While Galton concluded that petitionary and intercessory prayer was not effective, he noted that there was subjective value in mediating emotional pain and experiencing divine comfort. Nonetheless, it was an attempt and a beginning point in the study of this phenomenon.
Galton F. Fortnightly Review vol. 12, pp. 125-35, 1872