The IQ test is scored so that the mean score is 100 and the distribution has the shape of a Gaussian function, with a standard deviation of 15. The plot shows the percentage of people getting a score versus the score itself, from 55 to 145 IQ, i.e. (145-55)/15 = 6 times the standard deviation. Lengths as long as the standard deviation are represented with different colours. In order to create it, first I ran the following Octave code:
%standard deviation:
sigma = 15;
%IQ values:
IQ=55.5:144.5;
%Gaussian function:
G=exp(-(IQ-100).^2./(2*sigma^2));
H=exp(-(IQ-100).^2./(2*sigma^2));
%Normalisation in the [0:100] range
G=100*G/sum(G);
H=100*H/sum(H);
%to plot them in different colors
G(1:15)=0;
G(31:45)=0;
G(61:75)=0;
H(16:30)=0;
H(46:60)=0;
H(76:90)=0;
%output to text file:
T=[IQ; G; H];
T = T';
save -ascii 'IQ_curve.dat' T;
Since I wanted a symmetric plot, I shifted the domain by 0.5. It will save the samples in an external file called IQ_curve.dat. In order to get the plot in different colours, the function is split in two different functions, when one is zero the other one is non-null and vice versa. Plotting G and H we will get the effect we want. In order to get the SVG, I used the following Gnuplot code:
set terminal svg
set output "IQ_curve.svg"
set xrange [55.5:144.5]
set key off
set xzeroaxis linetype -1 linewidth 0.5
set yzeroaxis linetype -1 linewidth 0.5
set xtics axis
set ytics axis
plot "IQ_curve.dat" using 1:2 with impulses linewidth 1.5, \
"IQ_curve.dat" using 1:3 with impulses linewidth 1.5
Then I post-processed the file with Inkscape.
|