The standard procedure to determine the brain response from a multitrial evoked magnetoencephalography (MEG) of electroencephalography (EEG) data set is to average the individual trials of these data, time locked to the stimulus onset. When the brain responses vary from trial-to-trial this approach is false. In this paper, a maximum-likelihood estimator is derived for the case that the recorded data contain amplitude variations. The estimator accounts for spatially and temporally correlated background noise that is superimposed on the brain response. The model is applied to a series of 17 MEG data sets of normal subjects, obtained during median nerve stimulation. It appears that the amplitude of late component (30-120 ms) shows a systematic negative trend indicating a weakening response during stimulation time. For the early components (20-35 ms) no such a systematic effect was found. The model is furthermore applied on a MEG data set consisting of epileptic spikes of constant spatial distribution but varying polarity. For these data, the advantage of applying the model is that positive and negative spikes can be processed with a single model, thereby reducing the number of degrees of freedom and increasing the signal-to-noise ratio.