"Statistical Probabilities" is a season six episode of Star Trek: Deep Space Nine.
With Federation/Dominion peace negotiations in the background, the revelation in "Doctor Bashir, I Presume?" that Bashir is a genetically augmented human allows him to be open about his wish to help less fortunate augments with their problems. He is introduced to four augments who, due to unintended side effects, are unable to function in society. Parents who allow their children to be genetically manipulated attempt to keep the procedure secret: it's illegal, and augmented human beings are prohibited from joining most professions and may not join Starfleet. However, the problems developed by these four augments forced their parents to seek medical help for them. The four have been institutionalized for most of their lives, and as such are very close to each other, but mistrust outsiders, even their own doctor, Dr. Loews (Jeanetta Arnette).
The four augments are:
* Jack (Tim Ransom) - Jack is a male in his thirties, perhaps a little older than Bashir. His mental and physical abilities are significantly superior to the average human. However, his great abilities are matched by extreme anxiety, which often manifests itself as paranoia, assertiveness and physical aggression. He generally feels superior to other people, and as a result has little empathy for the suffering he causes. Because of his proactive nature, he generally feels himself to be the leader of his group of compatriots.
* Lauren (Hilary Sheppard) - Lauren is an attractive female, almost 40. She is extremely intellectually developed and quite engaging. However, she is prone to sexual misbehavior, which often manifests itself as her being sure almost all men are madly in love with her.
* Patrick (Michael Keenan) - Patrick is a man in his fifties with obvious mental abilities, although he is just as obviously not athletic. However, despite his age and intellect, he has the emotional responses of a child. When something annoys him (such as a minor noise amplified by his genetically improved hearing) he becomes petulant. He is prone to emotional outbursts. When threatened with punishment, he suffers from extreme anxiety.
* Sarina Douglas (Faith Salie) - Sarina is a woman in her late twenties who is incapable of human communication, either speaking or writing, although she can understand both (no mention is made of sign language or of telepathic communication, but one presumes she can't use those either). She is both frustrated and resigned to the fact that she cannot communicate her thoughts and insights. Like an autistic person, she grew up with difficulty processing sensory input, in her case because her cerebral cortex can't pick up the information fast enough.
Bashir realizes that his patients' primary problem is boredom. As Jack has pointed out, they are forbidden from pursuing any profession where they could put their brain power to work. Meanwhile, Damar has become the new leader of the Cardassian Union and offers peace talks with the Federation. Watching his speech, the augments make several incredibly accurate guesses about Damar and how he came to power, including that he murdered the "princess" (Tora Ziyal) of the "deposed king" (Dukat). Bashir convinces Sisko to allow the augments to review the peace negotiations to see if they can determine the Dominion's agenda.
The project works beyond Bashir and Sisko's wildest dreams. Based on subtle grammatical clues (the augments learn the Dominion language overnight), intimate knowledge of Dominion tactics (their negotiators offer something valuable to cover the fact they are after something even more valuable), and behavioral idiosyncrasies (they notice Damar avoids certain star systems with his eyes), the Federation learns that the Dominion wants to draw the border to secure a planet that has many of the raw materials needed to make Ketracel White. Knowing this gives the Federation negotiators a huge advantage in the talks.
As such, the Federation agrees to provide the augments with further intelligence information. As a result, the augments develop a statistical historical model to predict the future. The augments soon come to the conclusion that the Federation is doomed to lose the war and suffer casualties in the hundreds of billions. As a result, they recommend surrender, which will save those lives and still leave the Federation in a position to rise up against the Dominion in the future. Bashir is convinced the augments are right, and pleads the case before Captain Sisko. However, Sisko and Starfleet reject the suggestion out of hand.
Faced with what they feel is the equivalent of a decision to commit suicide, the augments decide to try to leak Starfleet's strategic plans to the Dominion negotiators on board DS9, hoping to shorten the war and minimize the casualties. Bashir rightly sees this as foolhardy, but Jack, Lauren and Patrick overpower him. Bound hand and foot, and left alone with Sarina, Bashir convinces Sarina that her fellow augment's actions will result in their imprisonment and separation. Bashir plays on the fact that he has determined that Sarina is in love with Jack (something the other augments have failed to realize). Sarina frees Bashir in the nick of time, and alerts Odo, who intercepts the augments on their way to the meeting with the Dominion negotiators.
Later, Bashir realizes that hubris primarily drove their belief that the Federation would lose. Rather than believe they might be wrong about the course of the war, they decided they couldn't possibly be wrong because of their superior intellect. The key point is that despite all of their intelligence and the presumed infallibility of their statistical historical model, the actions of one person (Sarina) altered their plan, which in turn completely altered history (changing a turkey shoot by the Dominion into a drawn out slog at worst).
Bashir returns to his duties, and the augments return to their institution, promising to continue work on a plan for defeating the Dominion (albeit without classified information).
The augments would return in a later episode - "Chrysalis".