A method of constructing a waveform, said waveform representing the results of a test, comprising: obtaining a plurality of signals by way of electrodes (10, 12, 14) attached non-invasively to a patient's scalp or below a patient's eye to detect responses to stimuli generated by an optic nerve or retina, respectively, wherein said plurality of signals is obtained by one of visually evoked potential testing or pattern electroretinography (PERG) testing; storing said plurality of signals; analyzing said plurality of signals to identify an area of interest (P50, P100), including signal averaging at least two signals to form a signal-averaged waveform, and detecting the area of interest in said signal-averaged waveform, wherein said area of interest is a portion of the waveform that is found within a predetermined timeframe (A, B, C, D, E) in the respective signal; obtaining a cluster of signals, each of said signals in said cluster of signals having said area of interest, wherein said cluster of signals is obtained by generating a histogram of said plurality of signals to identify a cluster of signals having said area of interest occur in an expected timeframe, the histogram having bins (N75-P100), each bin having a corresponding latency range, wherein the signals in said cluster of signals are located in two or more consecutive bins of the histogram based on the latency of said area of interest in the respective signals; calculating a percentage value for said cluster of signals, said percentage value corresponding to a percentage of signals having said area of interest out of a total of said plurality of signals; determining if said percentage value is greater than a predetermined percentage value; and if said percentage value is greater than the predetermined percentage value, generating a resultant signal-averaged waveform from the signals in said cluster of signals, wherein signals in the plurality of signals that are located outside the two or more consecutive bins of the histogram are outliers and are not included in the resultant signal-averaged waveform. obtaining a plurality of signals by way of electrodes (10, 12, 14) attached non-invasively to a patient's scalp or below a patient's eye to detect responses to stimuli generated by an optic nerve or retina, respectively, wherein said plurality of signals is obtained by one of visually evoked potential testing or pattern electroretinography (PERG) testing; storing said plurality of signals; analyzing said plurality of signals to identify an area of interest (P50, P100), including signal averaging at least two signals to form a signal-averaged waveform, and detecting the area of interest in said signal-averaged waveform, wherein said area of interest is a portion of the waveform that is found within a predetermined timeframe (A, B, C, D, E) in the respective signal; obtaining a cluster of signals, each of said signals in said cluster of signals having said area of interest, wherein said cluster of signals is obtained by generating a histogram of said plurality of signals to identify a cluster of signals having said area of interest occur in an expected timeframe, the histogram having bins (N75-P100), each bin having a corresponding latency range, wherein the signals in said cluster of signals are located in two or more consecutive bins of the histogram based on the latency of said area of interest in the respective signals; calculating a percentage value for said cluster of signals, said percentage value corresponding to a percentage of signals having said area of interest out of a total of said plurality of signals; determining if said percentage value is greater than a predetermined percentage value; and if said percentage value is greater than the predetermined percentage value, generating a resultant signal-averaged waveform from the signals in said cluster of signals, wherein signals in the plurality of signals that are located outside the two or more consecutive bins of the histogram are outliers and are not included in the resultant signal-averaged waveform.