% Example 9.8
% This example shows how to construct a q-q plot using random samples from
% the same distribution. 

% Generate the samples - same size.
x = randn(1,300);
% Make the next one a different mean 
% and standard deviation.
y = randn(1,300)*.75 + 1;
% Find the order staistics - sort them.
xs = sort(x);
ys = sort(y);
% Construct the q-q plot - do a scatterplot.
plot(xs, ys, '.')
xlabel('Standard Normal - Sorted Data')
ylabel('Normal - Sorted Data')
title('Q-Q Plot')

