With an antivirus or another type of software testing, a false positive or false alarm is an error that improperly indicates a condition. For example, when scanning a file for a virus, an antivirus may return a false positive indicating a clean file is infected.
What causes a false positive?
With computers, a false positive is always caused by an error in programming or the algorithm used to detect the condition. In the case of detecting a computer virus, viruses can be polymorphic or use other schemes to make itself difficult to detect. For the antivirus to detect these viruses, the programmer cannot look for specific code and has to create a list of rules the virus may exhibit. Unfortunately, these rules may be inadequate or invalid, and cause a false positive.
A false negative is the opposite of a false positive. Where the false negative is not reporting a condition that is present.
How do I know if I’m encountering a false positive?
Unfortunately, unless the error is obviously false, it can be difficult to know if the error is a false positive. Re-running the test again can sometimes help with verifying the results, and if possible, re-running the test with a different program really helps.
For example, to verify if a file is infected with a virus, you can use a tool like VirusTotal to scan a file online using different antivirus scanners. If two antivirus programs indicate the file is infected, but all other antivirus scanners show it’s clean, it’s reasonable to assume those showing the infection are giving a false positive.
False, Programming terms, Software terms