||The English used in this article or section may not be easy for everybody to understand. (April 2012)|
|The Simple English Wiktionary has a definition for: error.|
In statistics[change | change source]
In statistics, an error does not mean a mistake. A statistical error is the amount by which a sample differs from its expected value. The expected value is based on the whole population from which the individual was chosen.
A tricky point is the following:
- The difference between a value in the sample and the (unobservable) population mean is a statistical error, whereas
- The difference between a value in the sample and the observable sample mean is a residual.
Computer programming[change | change source]
The word error can be used to describe a computer program that was not written in the right way. A syntax error is a bit of source code that does not make sense to the computer. A logic error is a mistake in the algorithm used, which might result in problems with the output.
An error may also be an exception, which is something that happens unexpectedly. For example, it is an error to try to write more files onto a disk that is full. Careful programmers write code that can deal with errors that may happen; they can do this by labeling each error with an error code and using exception handling. Continuing to run a program when an error has not been dealt with can cause error avalanche, which means errors pile up and behavior becomes more difficult to predict.