Attention-deficit hyperactivity disorder (ADHD) affects about 5% of the population. In order to minimize ADHD effects, it is important to identify its biomarkers. We analyzed electroencephalographic (EEG) signals using a random forest (RF) classifier optimized with a genetic algorithm (GA) to find differences between control and ADHD groups. Data from 856 participants were analyzed with a preprocessing procedure that included artifact subspace reconstruction (ASR) and independent component analysis (ICA). After preprocessing and GA optimization, the RF classifier achieved 88.6% total average accuracy considering the theta frequency band. This outcome suggests that this approach has great potential as a biomarker analyzer for ADHD diagnosis.