The impact of risk factors on the development of peptic ulcers has been shown to vary among different populations. We sought to establish a correlation between these factors and their involvement in the occurrence of peptic ulcers for which a canonical correlation analysis was applied. We included 7,014 patient records (48.6% women, 18.4% duodenal ulcer [DU], 4.6% gastric ulcer [GU]) of those underwent upper gastroendoscopy for the last 5 years. The variables measured are endoscopic findings (DU, GU, antral gastritis, erosive gastritis, pangastritis, pyloric deformity, bulbar deformity, bleeding, atrophy, Barret esophagus and gastric polyp) and risk factors (age, gender, Helicobacter pylori infection, smoking, alcohol, and nonsteroidal anti-inflammatory drugs [NSAIDs] and aspirin intake). We found that DU had significant positive correlation with bulbar deformity (P=2.6 x 10(-23)), pyloric deformity (P=2.6 x 10(-23)), gender (P=2.6 x 10(-23)), H. pylori (P=1.4 x 10(-15)), bleeding (P=6.9 x 10(-15)), smoking (P=1.4 x 10(-7)), aspirin use (P=1.1 x 10(-4)), alcohol intake (P=7.7 x 10(-4)), and NSAIDs (P=.01). GU had a significantly positive correlation with pyloric deformity (P=1,6 x 10(-15)), age (P=2.6 x 10(-14)), bleeding (P=3.7 x 10(-8)), gender (P=1.3 x 10(-7)), aspirin use (P=1.1 x 10(-6)), bulbar deformity (P=7.4 x 10(-4)), alcohol intake (P=.03), smoking (P=.04), and Barret esophagus (P=.03). The level of significance was much higher in some variables with DU than with GU and the correlations with GU in spite of being highly significant the majority, were small in magnitude. In conclusion, Turkish patients with the following endoscopic findings bulbar deformity and pyloric deformity are high-risk patients for peptic ulcers with the risk of the occurrence of DU being higher than that of GU. Factors such as H. pylori, smoking, alcohol use, and NSAIDs use (listed in a decreasing manner) are risk factors that have significant impact on the occurrence of DU; aspirin has a significant impact on both DU and GU.