re;
plotHist(data,nbins,n+nn);
plotHist(outliers,nn,n+nn);
plotPDFs([data ; outliers]);
printPmtkFigure('robustDemoOutliers')

%% Bucket the data into nbins, divide the size of each bin by norm and plot
%% the normalized histogram. 
function plotHist(data,nbins,norm)
    hold on;
    [counts, locations] = hist(data,nbins);
    sCounts = counts ./ norm;
    bar(locations,sCounts);
end
%% 
function plotPDFs(data)
    Xbar = mean(data);
    sigma = std(data);
    gauss = @(X) gaussProb(X, Xbar, sigma.^2);
    