00->1
Learning pathStep 17 of 62Defence, offence and intelligence ← All writeups

False Positives and False Negatives, Explained

If you are reading this, you have probably heard an analyst say "that alert was a false positive" or "we had a false negative", and you want to know exactly what that means and why it matters so much.

By the end you will be able to name the four possible outcomes of any security detection, explain why both kinds of mistake are costly, calculate the key measures (detection rate, false positive rate, precision), understand why a tool that is "99% accurate" can still bury a team in false alarms, and describe how teams reduce each kind of error.


1. The setup: a detector and the truth

A security tool that detects threats is a detector. It looks at activity (network traffic, files, logins, emails) and decides one of two things: raise an alert or stay quiet.

At the same time, there is a reality that the tool cannot see directly: the activity was either truly malicious or truly harmless.

Put those two together and every decision falls into one of four boxes:

Activity is malicious Activity is harmless
Tool raises an alert True positive (TP) False positive (FP)
Tool stays quiet False negative (FN) True negative (TN)

Read it in two steps:

  1. The second word says what the tool did: positive means it raised an alert, negative means it stayed quiet.
  2. The first word says whether the tool was right: true means correct, false means wrong.

A warning about the words: "positive" does not mean "good news". In detection, positive means "a threat was flagged". That is why a false positive is a false alarm and a false negative is a miss.


2. The four outcomes in plain words

True positive (TP): correct alert

The tool flags a threat that really is there.

Example: antivirus flags a file, and the file really is malware.

True negative (TN): correct silence

The tool stays quiet and there really is no threat.

Example: an employee opens a normal spreadsheet, and nothing fires.

True negatives are by far the most common outcome in a healthy environment, and nobody notices them. That is a good thing.

False positive (FP): false alarm

The tool flags something harmless. NIST glossary definitions:

  • "An instance in which a security tool incorrectly classifies benign content as malicious." (NIST SP 800-83 Rev. 1)
  • "Incorrectly classifying benign activity as malicious." (NIST SP 800-86)

(NIST glossary: false positive)

Example: antivirus flags a legitimate administration tool as a virus.

False negative (FN): a miss

The tool fails to flag a real threat. NIST glossary definitions:

  • "An instance in which a security tool intended to detect a particular threat fails to do so." (NIST SP 800-83 Rev. 1)
  • "Incorrectly classifying malicious activity as benign." (NIST SP 800-86)

(NIST glossary: false negative)

Example: ransomware runs on a laptop and no alert is raised.

One scenario, all four outcomes

A rule raises an alert when an account has many failed logins:

What happened Alert raised? Outcome
An attacker guesses passwords against an account, and the rule fires Yes True positive
An employee mistypes their password twice, then logs in, and nothing fires No True negative
An employee returns from holiday and fails five times before remembering the password, and the rule fires Yes False positive
An attacker tries one password per hour over a week, and the rule never fires No False negative

Another name you will meet: Type I and Type II errors

In statistics, a Type I error is a false positive and a Type II error is a false negative. The idea is framed as testing a "null hypothesis" meaning "nothing is wrong" (the item is not a weapon, the activity is normal). A Type I error wrongly rejects it (false alarm); a Type II error wrongly keeps it (miss). NIST's SP 800-90B glossary entry also notes that a false positive is "also referred to as a type 1 error." (Wikipedia: Type I and type II errors)


3. Why both mistakes hurt

It is tempting to think only the miss matters. In practice, both cause real damage, in different ways.

The cost of false positives

  • Wasted time. Every alert has to be checked. Time spent on harmless alerts is time not spent on real ones.
  • Alert fatigue. When most alerts turn out to be nothing, people start to trust them less and skim them. One reference on intrusion detection systems notes that "it is not uncommon for the number of real attacks to be far below the number of false-alarms", and that as a result "the real attacks are often missed and ignored." (Wikipedia: Intrusion detection system) So false positives can cause false negatives.
  • Business disruption when the tool also blocks. A security tool that automatically quarantines or blocks can break normal work. In the antivirus world, "a false positive in an essential file can render the Windows operating system or some applications unusable." Documented cases include a faulty Symantec signature in May 2007 that removed essential operating system files and left thousands of PCs unable to boot, and a McAfee update in April 2010 that flagged a normal Windows file (svchost.exe) as a virus, causing reboot loops (Wikipedia: Antivirus software).

The cost of false negatives

  • The attack goes unnoticed. A false negative means the attacker keeps going. The longer they are unseen, the more they can steal, change or destroy.
  • They are silent. A false positive announces itself with an alert. A false negative produces nothing, so you often learn about it only later, from another source or from the damage. That is why they are often treated as the more dangerous error.
  • False confidence. "No alerts" feels like safety. If the tool is missing things, that feeling is wrong.

The two are not equally costly

Which error is worse depends on what is at stake. Airport security is the classic example: screening systems tolerate many false alarms (a belt buckle sets off the alarm) to avoid the dangerous miss (a real weapon). A smoke detector is the same: better to ring for burnt toast than to miss a fire. (Wikipedia: Type I and type II errors, Precision and recall)

But there is a limit. If a detector cries wolf all day, people stop responding, and the protection disappears anyway. The goal is not zero of either error, which is not possible, but a sensible balance for each situation.


4. Measuring them: the key numbers

Counting each box gives the four numbers TP, FP, TN and FN. From them, a handful of measures describe how a detector performs. The formulas below are standard (Wikipedia: Confusion matrix, Precision and recall).

Measure Also called Formula Plain-language question
Recall Detection rate, sensitivity, true positive rate TP / (TP + FN) Of all real threats, how many did we catch?
False negative rate Miss rate FN / (TP + FN) = 1 − recall Of all real threats, how many did we miss?
Specificity True negative rate TN / (TN + FP) Of all harmless activity, how much did we correctly leave alone?
False positive rate FP / (FP + TN) = 1 − specificity Of all harmless activity, how much did we wrongly flag?
Precision Positive predictive value TP / (TP + FP) Of all the alerts, how many were real?
Accuracy (TP + TN) / total Of all decisions, how many were right?
F1 score 2·TP / (2·TP + FP + FN) A single number balancing precision and recall

The two you need most in a security operations role:

  • Recall tells you about misses (false negatives).
  • Precision tells you about the noise (false positives) from an analyst's point of view: how trustworthy is an alert when it arrives?

Be careful with accuracy. As the next section shows, it can look excellent while the tool is nearly useless.


5. A worked example: why "99%" can still mean a flood of false alarms

Here is an illustrative case. The numbers are made up, but the arithmetic is exact.

Setup. A company's systems produce 1,000,000 events in a day. Only 100 of them are truly malicious (a rare event, as is usual). A detector is quite good:

  • It catches 99% of malicious events (recall = 99%).
  • It wrongly flags 1% of harmless events (false positive rate = 1%).

Result:

Malicious (100) Harmless (999,900) Total
Alert TP = 99 FP = 9,999 10,098 alerts
No alert FN = 1 TN = 989,901 989,902 quiet

Measures:

Measure Value
Recall (detection rate) 99 / 100 = 99%
Specificity 989,901 / 999,900 = 99%
Accuracy (99 + 989,901) / 1,000,000 = 99.0%
Precision 99 / 10,098 ≈ 0.98%
Share of alerts that are false 9,999 / 10,098 ≈ 99%

The tool is "99% accurate", catches 99% of attacks, and yet about 99 out of every 100 alerts are false alarms. An analyst opening an alert has roughly a 1-in-100 chance that it is real.

If each alert took only five minutes to look at, that would be about 841 analyst-hours a day (an illustration, not a measurement).

Why this happens: the base rate

This is called the base rate fallacy, or the false positive paradox: "the program's list of criminals will likely have far more innocents (false positives) than criminals (true positives) because there are far more innocents than criminals overall" (Wikipedia: Base rate fallacy). When the thing you are looking for is rare, even a small error rate on the huge number of harmless events creates more false alarms than there are real attacks.

Accuracy hides this because the many true negatives dominate the total. This is why Wikipedia's confusion-matrix article warns that on unbalanced data accuracy becomes misleading. For security, look at precision and recall, not accuracy alone.

The same detector, improved

Now cut the false positive rate from 1% to 0.1% and keep everything else the same:

Malicious (100) Harmless (999,900)
Alert TP = 99 FP = 1,000
No alert FN = 1 TN = 998,900

There are now 1,099 alerts, and precision rises from about 1% to about 9%. Still mostly noise, but about nine times better. This shows how valuable small reductions in the false positive rate are when attacks are rare.


6. The trade-off between the two errors

For most detectors there is a setting that decides how suspicious something must be before an alert fires: a threshold, a rule's sensitivity, or how broad a signature is. Moving it changes both error types in opposite directions:

If you make it more sensitive If you make it less sensitive
Catches more real attacks (fewer false negatives) Fewer false alarms (fewer false positives)
But raises more false alarms But misses more real attacks

NIST describes a threshold as "a value that sets the limit between normal and abnormal behavior", for example "x failed connection attempts in 60 seconds" (NIST SP 800-94, section 3.2.3).

Using the failed-login rule from earlier as an illustration:

Rule Likely effect
Alert after 3 failed logins in 5 minutes Catches fast guessing, but also every forgetful user (many false positives)
Alert after 50 failed logins in 5 minutes Almost no false alarms, but a slow, careful attacker never reaches the threshold (false negatives)

Neither setting is "right". The right one depends on the account, the risk and how many alerts the team can handle. Precision and recall usually move in opposite directions this way, so improving one often costs the other.

Two detection styles, two typical error patterns

Style How it works Typical weakness
Signature-based Matches known bad patterns Misses new, unknown attacks (false negatives)
Anomaly-based Flags behaviour that differs from a normal baseline It "may suffer from false positives: previously unknown legitimate activity may also be classified as malicious"

Most products combine techniques, which NIST says "generally supports more accurate detection and more flexibility in tuning and customization." (NIST SP 800-94)


7. Where you meet them

Tool A false positive looks like A false negative looks like
Antivirus / endpoint protection A legitimate program flagged or quarantined as malware Real malware runs unnoticed. Tests show no antivirus product detects everything
Intrusion detection (IDS/IPS) Normal traffic or a harmless bug triggers an alert, or is blocked A real attack, or one using evasion such as fragmented packets, passes without an alert
SIEM correlation rule (see Security Operations) A rule fires on normal behaviour An attack pattern the rule does not describe goes unseen
Vulnerability scanner NIST: "reporting vulnerabilities when none exist" A real vulnerability that the scanner does not report
Email filter A legitimate message sent to spam or blocked A phishing email reaches the inbox

Vulnerability scanners deserve a special note, because NIST says so directly. In its security testing guide (SP 800-115) it states that scanners "can have a high false positive error rate", that application scanners "typically have high false positive rates", and that they "also suffer from the high false negative rates that characterize other signature-based tools." Because of this, "an individual with expertise in networking and OS security should interpret the results" (NIST SP 800-115, section 4.3). A scanner finding is a lead to check, not a proven fact.


8. Handling false positives

The goal is fewer false alarms without creating blind spots.

Step 1: Verify, do not assume

For each alert, look at the evidence and the context: Who did it? Is it normal for that user or machine? Does anything else support it? Then record the result (real or false positive). Those records are the raw material for improvement.

Step 2: Tune the detector

NIST SP 800-94 lists several tools for tuning intrusion detection (section 3.2.3), including:

Tuning tool What it does
Thresholds Set the limit between normal and abnormal
Whitelists (allowlists) Lists of known-benign entities, used "to reduce or ignore false positives involving known benign activity from trusted hosts"
Alert settings Turn alerts on or off, set default priority and severity, choose how people are notified

It adds that "most IDPSs require at least some tuning and customization to improve their detection accuracy", and that the more powerful a product's tuning options are, "the more its detection accuracy can be improved from the default configuration."

Step 3: Keep tuning honest

Every exception you add is also a place an attacker could hide. NIST advises that administrators "review tuning and customizations periodically", and that "whitelists and blacklists should be checked regularly and all entries validated to ensure that they are still accurate and necessary." Thresholds and alert settings "might need to be adjusted periodically to compensate for changes in the environment and in threats."

Step 4: Test blocking before turning it on

For tools that block automatically, NIST describes a learning or simulation mode that "suppresses all prevention actions and instead indicates when a prevention action would have been performed", so administrators can fine-tune "before enabling prevention actions, which reduces the risk of inadvertently blocking benign activity."


9. Finding and reducing false negatives

False negatives are harder because nothing alerts you. You have to go looking. These are the main approaches.

  1. Test your detections on purpose. Run safe, authorized simulations of attacker behaviour and check whether the tools notice. This is exactly what a red team or a purple team does (see the red, blue and purple teams post). NIST's penetration testing guidance lists "defenders' ability to detect attacks and respond appropriately" as something such testing can reveal, and SP 800-94 recommends "periodically verifying that the IDPS is functioning properly (e.g., processing events, alerting appropriately on suspicious activity)." Open-source test libraries such as Atomic Red Team map small tests to the MITRE ATT&CK framework for this purpose.
  2. Map your coverage. MITRE says ATT&CK can be used to "assess your organization's capabilities and drive engineering decisions like what tools or logging you should implement." (MITRE ATT&CK) Listing which attacker techniques you can and cannot detect shows where the gaps are.
  3. Use more than one view. NIST notes that vulnerabilities missed by one scanner "can potentially be caught using multiple vulnerability scanners or additional forms of testing", and that using multiple scanners is common practice.
  4. Keep signature-based tools current. Scanners, like virus scanners and IDSs, "rely on a repository of signatures", so signatures must be updated frequently.
  5. Do not leave defaults as they are. NIST warns that without configuration work, "some IDPSs might be capable of detecting only a small number of older, easily identified attacks."
  6. Learn from incidents. When something slips through, ask which alert should have fired and why it did not. Every real false negative is a free lesson.

10. Common mistakes

Myth The facts
"Positive means good" In detection, positive means a threat was flagged
"No alerts means no attacks" It may mean false negatives. Silence proves nothing about a tool's coverage
"99% accurate means it works well" When attacks are rare, accuracy hides a flood of false alarms (section 5)
"More alerts means more security" Too many false positives cause alert fatigue, which causes real alerts to be missed
"False positives are harmless" They waste time, and when tools block automatically they can break working systems
"We can reach zero of both" No detector is perfect. You balance them to suit the risk
"A false negative and a true negative are similar" A true negative is correct silence. A false negative is a missed attack
"A scanner finding is a confirmed vulnerability" Scanners have high false positive rates; findings need validation

Closing

Every detection tool makes a decision, and every decision lands in one of four boxes: a true positive (real threat, alert), a true negative (harmless, quiet), a false positive (harmless, alert), or a false negative (real threat, quiet).

Keep these points:

  • False positive: a false alarm. It costs time and trust, and can cause outages.
  • False negative: a miss. It is silent and dangerous.
  • Measure with recall and precision, not accuracy alone, especially when attacks are rare.
  • The two errors trade off. Tuning is about choosing a balance, then re-checking it as things change.
  • Silence is not safety. Test your detections on purpose to find the misses.

If you can explain the worked example in section 5 to someone else, and say why 99% accuracy still produced 99% false alerts, you understand this topic.