\documentclass[12pt]{article}\usepackage[Mickael]{ammaths}


\begin{document}\nocolor

\en

\enteteseconde{9}{Statistique -- Measures of dispersion}{Statistique et probabilités 2}

\begin{center}
\fbox{\parbox{13.5cm}{\sf\small A la fin de ce chapitre, vous devez être capable de :
\begin{itemize}
\itemb calculer la médiane et les quartiles d'une série définie par effectifs ou fréquences ;
\itemb calculer des effectifs cumulés, des fréquences cumulées ;
\itemb représenter une série statistique par une courbe des fréquences cumulées ;
\itemb utiliser un logiciel ou une calculatrice pour étudier une série statistique. 
\end{itemize}}}
\end{center}


\exoc{{\bf \textsf{Some simple examples}}

Compute the median and quartiles for each of the following sets of statistical data :
\begin{enumerate}
	\item $11$ ; $24$ ; $32$ ; $41$ ; $49$ ; $66$ ; $85$.
	\item $12$ ; $25$ ; $8$ ; $13$ ; $15$ ; $5$.
	\item \begin{tabular}{|*{7}{c|}} \hline 
	Value		&2	&3	&4	&5	&6	 &7	 \\ \hline 
	Frequency	&12	&23	& 14 & 42 & 17  & 21 \\ \hline 
	\end{tabular}
	\item \begin{tabular}{|*{7}{c|}} \hline 
	Value		&2	&3	&4	&5	&6	 &7	 \\ \hline 
	Frequency	&0.25	&0.1	& 0.1 & 0.2 &0.15  &0.2\\ \hline 
	\end{tabular}
\end{enumerate}}



\exoc{{\bf \textsf{The cumulative frequencies polygon}}

In a class, the marks of a test are as shown below :
\begin{center}
$3$ - $12$ - $10$ - $5$ - $7$ - $9$ - $7$ - $12$ - $18$ - $9$ - $8$ - $10$ - $15$ - $3$ - $15$ -
$7$ - $12$ - $9$ - $10$ - $5$
\end{center}
\begin{enumerate}
\item \begin{enumerate}
       \item Find the median and the quartiles and explain your method.
       \item Interpret the median and the quartiles in the context of this exercise.
      \end{enumerate}
\item Approximate values of the median and quartiles can also be found using the cumulative frequencies polygon.
	\begin{enumerate}
	\item Fill out a table with the relative frequencies distribution and the cumulative relative frequencies.
	\item Draw the cumulative frequencies polygon (units 1 cm in abscissa, 10cm in ordinate).
	\item Draw the line $y=0.5$ and find the abscissa of its intersection with the frequency polygon. This is an approximate value of the median. Compare it to the value you found in the previous question.
	\item Adapt the previous method to find approximate values of the two quartiles.
      \end{enumerate}
\end{enumerate}}

\pagebreak


\exoc{{\Huge\ComputerMouse} {\bf \textsf{CO$_2$ Emissions in 2009}}

The file CO2Emissions.ods in the folder {\tt PartageEleves/2ndeEuro/} gives the total CO$_2$ emissions of some countries in 2009, in Gigagrams.
The countries are sorted by alphabetical order.

\begin{enumerate}
\item Compute the positions (not the values) of the median and the two quartiles.
\item Can you find the values of the median and the quartiles with the countries sorted that way ?
\item Select the cells B2 to C42, then use the Data/Sort command to sort the countries by CO$_2$ emissions, in ascending order.
\item What country had the lowest CO$_2$ emissions in 2009 ?
\item What country had the highest CO$_2$ emissions in 2009 ?
\item Find the median and quartiles of this statistical series with the usual method.
\item \begin{enumerate}
	\item In the cells C43 to C45, enter the formulas {\tt =MEDIANE(C2:C42)}, {\tt =QUARTILE(C2:C42;1)} and {\tt =QUARTILE(C2:C42;3)}.
	\item Explain these three formulas.
	\item Do you get the same results as with the usual method ? If not, which ones are correct ?
	\end{enumerate}

\end{enumerate}
}

\exoc{{\bf \textsf{Quality control}}

A machine is producing cylindric bars of steel for reinforced concrete, with a theoretical diameter of 25mm. The quality of the production is controlled by extracting a sample of 200 bars from the production. The diameters of these bars are given below, in inches to 3DP.
\begin{center}
\begin{tabular}{|*{11}{c|}} \hline
Diameter &0.949 &0.957 &0.965 &0.972 &0.980 &0.988 &0.996 &1.004 &1.012 &1.02 \\\hline
Frequency &2    &8     &26 &48   &38   &28  &20    &16   &10    &4 \\\hline
\end{tabular}
\end{center}

\probpart{-- Computation of the main statistical measures}
\begin{enumerate}
\item Explain the meaning of the value $38$ in the table.
\item Find out the population, the size of the population, the data and the type of data of this statistical series.
\item Give the relative frequency distribution.
\item Draw the frequencies polygon (scale : 1 cm for 0.2 unit on x-axis and 1 cm for 1 unit on y-axis).
\item Compute the mean of the data :
	\begin{enumerate}
	\item using the absolute frequencies ;
	\item using the relative frequencies.
	\end{enumerate}
\item Compute the median, the first and the third quartile of the data.
\item Interpret the average and the median in the context of this exercise.
\end{enumerate}
 
\fr
\probpart{-- Analysis of the data}      
\begin{enumerate} \setcounter{enumi}{7}
\item The machine is considered to be working correctly if :
	\begin{itemize}
	\item the range of the sample is less then 10\% of the mean $m$ ;
	\item the difference between the mean and the median is less than 0.2 ;
	\item 95\% of the bars have a diameter in the interval $[m - 0.8,m+ 0,8]$.
	\end{itemize}
	According to the values in the sample, can we consider that the machine is working correctly ?
\item A supervisor notices that the diameters were incorrectly measured and are in fact 0.04 inches more than the recorded values.
	\begin{enumerate} 
	 \item What is the true mean of the sample ? Explain?
	 \item What is the true range of the sample ? Explain?
	 \item What is the true median of the sample ? Explain?
	\end{enumerate}
\end{enumerate}}




\exoc{{\bf \textsf{Comparing two classes}}

Two classes were given the same math test. Here are the results, in two separate tables with the marks in the first row and the frequencies in the second row :

\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multicolumn{21}{|c|}{\bf Class \# 1} \\ \hline
0&	1&	2&	3&	4&	5&	6&	7&	8&	9&	10&	11&	12&	13&	14&	15&	16&	17&	18&	19&	20 \\ \hline
0&	0&	0&	0&	0&	0&	0&	1&	2&	1&	3&	7&	7&	4&	2&	1&	1&	1&	0&	0&	0\\
\hline
\end{tabular}
\end{center}

\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\hline
\multicolumn{21}{|c|}{\bf Class \# 2} \\ \hline
0&	1&	2&	3&	4&	5&	6&	7&	8&	9&	10&	11&	12&	13&	14&	15&	16&	17&	18&	19&	20 \\ \hline
0&	0&	0&	1&	0&	1&	1&	2&	0&	4&	5&	5&	3&	0&	1&	0&	0&	0&	2&	3&	2\\
\hline
\end{tabular}
\end{center}

The two teachers, talking about their classes, say that they managed the test in the same way, as the two means are equal. 

Use all the statistical measures that you know, which may be found using a calculator, to comment on that.


}


\exoc{{\bf \textsf{Legal marital age}}

In every country, there is a legal minimum age to be married. For example, in France, since 2006, no-one can be married before the age of 18. In some countries, the legal age is different for boys and girls. The table below gives the number of countries for different legal ages for girls. 

\begin{center}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|c|}
\hline
Legal age & 12&	13&	14&	15&	16&	17&	18&	19&	20&	21 \\
\hline
Number of countries & 1&	1&	1&	12&	16&	14&	120&	3&	6&	16 \\
\hline
\end{tabular}
\end{center}

\begin{enumerate}
\item Count the number of countries involved in this study.
\item Compute the average legal marital age in these countries. Compare this value to the legal age in France.
\item Find out the median and the quartiles of the legal marital age in this data. Interpret these values with three precise sentences.
\item The quartiles are not very useful with this data. Explain why.
\item Instead of the quartiles, we can use another set of statistical indicators called the deciles. Here are their definitions :
	\begin{itemize}
	\item the first decile, $D_1$, is a value such that at least 10\% of the data are less than $D_1$, and at least 90\% of the data are more than $D_1$ ;
	\item the ninth decile, $D_9$, is a value such that at least 90\% of the data are less than $D_9$, and at least 10\% of the data are more than $D_9$.
	\end{itemize}
Find out the values of $D_1$ and $D_9$ for this data. 
\end{enumerate}
}






\exoc{{\bf \textsf{Median and quartiles with grouped values}}

In some situations, there are so many different values possible in a statistical study that it is needed to group the values in intervals.
As an example, the table below gives the employment size of firms in the U.S. in 2008, including small businesses.

\begin{center}
\begin{tabular}{|l|c|}
\hline
Employment size & Frequency \\ \hline\hline
Firms with 1 to 4 employees &	3,617,764 \\ \hline
Firms with 5 to 9 employees &	1,044,065 \\ \hline
Firms with 10 to 19 employees &	633,141  \\ \hline
Firms with 20 to 99 employees &	526,307  \\ \hline
Firms with 100 to 499 employees &	90,386  \\ \hline
Firms with 500 to 749 employees &	6,060  \\ \hline
Firms with 750 to 999 employees &	3,038  \\ \hline
Firms with 1,000 to 1,499 employees &	3,044  \\ \hline 
Firms with 1,500 to 1,999 employees &	1,533  \\ \hline 
Firms with 2,000 to 2,499 employees &	904  \\ \hline
Firms with 2,500 to 4,999 employees &	1,934  \\ \hline 
Firms with 5,000 to 9,999 employees &	975  \\ \hline 
Firms with 10,000 employees or more &	981  \\ \hline
\end{tabular}

\end{center}

\begin{enumerate}
\item Explain the meaning of the number 90,386 in the row ``Firms with 100 to 499 employees''.
\item Compute the total number of firms covered by this study.
\item Use the middle of each interval to compute the mean number of employees.
\item Use the usual method to find the positions of the median and the quartiles.
\item What can we deduce about the median and quartiles from the previous answers ? Can we find their exact values ?
\item An approximate value of the median can be found with the formula below, where  
\begin{itemize}
	\item $L_m$ is the lower boundary of the median class ;
	\item $c$ is the size of the median class ;
	\item $F_{m-1}$ is the cumulative frequency of the class before median class ;
	\item $f_m$ is the frequency of the median class ;
	\item $n$ is the total number of the data.
     \end{itemize}
$$Med=L_m+\left[\frac{\frac{n}{2}-F_{m-1}}{f_m}\right]\times c$$
Use the formula with this statistical series.

\end{enumerate}

}


\exoc{{\bf \textsf{True of false ?}}

Are the following sentences true of false ? Each time it's false, give a counter-example.
\begin{enumerate}
\item In a statistical series, exactly half of the values are less than or equal to the median.
\item In a statistical series, exactly half of the values are less than or equal to the mean.
\item The median of a statistical series is always less then its mean.
\item The median of a statistical series may be different from its mean.
\item If the median of a statistical series is equal to 42, then the third quartile is greater than or equal to 42.
\item In a statistical series, there are as many values lower than the first quartile as there are values greater than the third quartile.
\item If the minimum in a statistical series is equal to 5, then all the values in the series are greater than or equal to 5.
\item If the minimum in a statistical series is equal to 5, then there is at least one value in the series greater than 5.
\item If the quartiles of a statistical series are equal to 7.1 and 11.9, then at least half of the values are between 7.1 et 11.9.
\item If more than half the values of a series are between 7.1 et 11.9, then the quartiles are equal to 7.1 et 11.9.
\end{enumerate}
}


\exoc{{\bf \textsf{The median}}


Below is an excerpt from the book \emph{Statistical Calculation For Beginners}, by E.G. Chambers, Cambridge University Press.

\begin{quote}
Another form of average that is sometimes used for convenience is the \emph{median}. This, as its name implies, is
the middle observation and it is easily found in ungrouped data by ranking the sample of observations in the order of
their size and finding the central observation, if $N$ [the number of observations] is odd, or the mean of the two
central observations, if $N$ is even.

If $N$ is odd, the median will be the $\frac{N+1}{2}$th observation. If $N$ is even, it will be the mean of the $\frac{N}{2}$th
and the $\left(\frac{N}{2}+1\right)$th observations. For example, the median of 2, 4, 6, 8, 10, 12 is the mean of the 3rd and 4th
readings, i.e. $(6+8)/2=7$.

The median is representative of a set of observations in the sense that there are exactly as many observations
greater than it as there are less. If the distribution is perfectly symmetrical, the median is equal to the mean.
\end{quote}

\begin{enumerate}
\item What is the median of a set of observations and how is it found?
\item Explain the difference between the median when $N$ is odd and when $N$ is even.
\item Consider the set of numbers 2, 4, 6, 8, 10, 12 given as an example in the text.
	\begin{enumerate}
	\item Check the median given in the text, then compute the arithmetic mean.
	\item What would be the median if the set had included an extra value equal to 14? 
	\item What would be the median if the set had included an extra value equal to 200? What would be the
arithmetic mean in that case? 
	\item What property of the median, that the arithmetic mean doesn't share, is highlighted by the answers to
the previous questions?
	\end{enumerate}
\item In what precise way is the median representative of a set of observations? Illustrate this property
with an example.
\item \begin{enumerate}
	\item Give an example of a set of 5 observations whose median is equal to the mean.
	\item Give an example of a set of 5 observations whose median is not equal to the mean.
	\end{enumerate}
\end{enumerate}}


\pagebreak

\exoc{\tice~{\bf \textsf{An algorithm to check the median}}

\begin{center}\vspace*{-15pt}
\begin{minipage}[t]{12cm}
\IncMargin{1em}
\begin{algorithm}[H]
%\KwData{$(x;y)$  \;}
\Begin{\KwIn{$S$, a statistical series \; 
$n$, the number of values in the series \;
$m$, a possible value for the median \;}
$l$ takes the value $0$ \;
$g$ takes the value $0$ \;
\For{every term $t$ in the series $S$}{
	\eIf{$t\leq m$}{$l$ takes the value $l+1$ \;}{$g$ takes the value $g+1$ \;}
     }
%\KwOut{\eIf{$l\geq\frac{n}{2}$ and $g\geq\frac{n}{2}$}{``$m$ is a median of this series.''}{``$m$ is not a median of this series.''}}}
\eIf{$l\geq\frac{n}{2}$ and $g\geq\frac{n}{2}$}{\KwOut{`$m$ is a median of this series.'' \;}}
						{\KwOut{`$m$ is not a median of this series.'' \;}}
}
\end{algorithm}
\DecMargin{1em}
\end{minipage}
\end{center}

\begin{enumerate}
\item After applying this algorithm to a certain statistical series such that $n=13$, we get, at the end of the {\bf for} loop, the values $l=2$ and $m=11$. What will be the output of the algorithm ?
\item In this question, the statistical series entered is $S={2,5,3,7,2,9,8,9,11,3}$.
	\begin{enumerate}
	\item What is the value of $n$ ?
	\item Apply the algorithm with $m=2$, showing the successive values of $l$ and $g$ in a table with two rows. What is the output ?
	\item Apply the algorithm with $m=6$, showing the successive values of $l$ and $g$ in a table with two rows. What is the output ?
	\item Are there other values of $m$ for which the output will be the same as in the previous question ?
	\end{enumerate}
\item How would you modify the algorithm to check the value of the first quartile, instead of the median ?
\end{enumerate}
}

\pagebreak

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\en
\partie{Homework \#6 -- Carbon emissions}

The exhaust gases of a car contain{\red e} carbone dioxide (CO$_2$), which is not toxic, and carbone monoxide (CO), which is toxic.
During a pollution control, the emissions of dioxide and monxide are measured and noted respectively $T_1$ for CO$_2$ and $T_2$ for CO. 
Then, the compound rate $T$ is computed :
$$T=\frac{15T_2}{T_1+T_2}$$
Regulations require that $T$ be less than $4.5$.

\begin{enumerate}
\item Copy and fill the table below, giving the emission of six cars labelled A to F :
			\begin{center}
			\begin{tabular}{|p{4cm}|*{6}{c|}}\hline
			Cars & A & B & C & D & E & F \\ \hline\hline
			$T_1$ & 12.5 & 6.5 & 10 & 7 & & 11 \\ \hline
			$T_2$ & 3 & 5 & & 4.5 & 2 & 1.5 \\ \hline
			$T$ & & & 3 & & 3 & \\ \hline
			\end{tabular}
			\end{center}
\item Which cars do not meet the regulations?
\end{enumerate}
The control staff use a graph (reproduced below), called an abacus.
			\begin{itemize}
			\item The CO$_2$ emissions are shown on the $x$-axis.
			\item The CO emissions are shown on the $x$-axis.
			\item The compound rate $T$ associated to the couple $(T_1;T_2)$ is shown as a set of half-lines starting from $O$ and labelled from $T=0.5$ to $T=10$.
			\end{itemize}
%le graph		
\begin{center}
\psset{xunit=0.5cm,yunit=1cm}
\begin{pspicture}(-.5,-.5)(16.5,9.5)
\pspolygon[linestyle=none,fillcolor=gray,fillstyle=solid](0,0)(16,0)(16,6.857)
\psgrid(16,8)
\psset{xunit=0.5cm,yunit=1cm}
\psset{linewidth=.25pt}
\psline(0,0)(16,0.552) %
\psline(0,0)(17,1.214) % 1
\psline(0,0)(16,1.778) %
\psline(0,0)(17,2.615) % 2
\psline(0,0)(16,3.200) %
\psline(0,0)(17,4.250) % 3
\psline(0,0)(16,4.870) %
\psline(0,0)(17,6.182) % 4
\psline(0,0)(16,6.857) %
\psline(0,0)(17,8.5)   % 5
\psline(0,0)(13.818,8) %
\psline(0,0)(12.75,8.5)% 6
\psline(0,0)(10.462,8) %
\psline(0,0)(9.714,8.5)% 7
\psline(0,0)(8,8)      %
\psline(0,0)(7.438,8.5)% 8
\psline(0,0)(6.118,8)  %
\psline(0,0)(5.667,8.5)% 9
\psline(0,0)(4.632,8)  %
\psline(0,0)(4.25,8.5) % 10
{\footnotesize\bf
\uput{.2cm}[0](17,1.214){$1$} % 1
\uput{.2cm}[0](17,2.615){$2$} % 2
\uput{.2cm}[0](17,4.250){$3$} % 3
\uput{.2cm}[0](17,6.182){$4$} % 4
\uput{.2cm}[45](17,8.5){$5$} % 5
\uput{.2cm}[90](12.75,8.5){$6$} % 6
\uput{.2cm}[90](9.714,8.5){$7$} % 7
\uput{.2cm}[90](7.438,8.5){$8$} % 8
\uput{.2cm}[90](5.667,8.5){$9$} % 9
\uput{.2cm}[90](4.25,8.5){$10$}} % 10
\uput{.2cm}[315](17,0){CO$_2$ emissions}
\uput{.2cm}[90](0,8.5){CO emissions}
\uput{.2cm}[90](16,9){Compound rate}
\end{pspicture}
\end{center}
			
\begin{enumerate} \setcounter{enumi}{2}
\item The point such that $T_1=7$ and $T_2=3$ is on the half-line labelled $T=4.5$. Check that this is correct.
\item Use the abacus to read the compound rate in the two situations below, and check the values with the formula.
			\begin{enumerate}
			\item Car G : $T_1=6$ and $T_2=2$ ;
			\item Car H : $T_1=10$ and $T_2=5$.
			\end{enumerate}
Do these cars meet the regulations ?
\item What is the grey region on the abacus ?
\item Prove that $T=4.5$ if and only if $T_2=\cfrac{3}{7}T_1$. Then, check that the slope of half-line labelled $T=4.5$ is indeed $\cfrac{3}{7}$.
\item What is the slope of the half-line labelles $T=2$ ?
\item A car such that $T_1=8$ meets the regulations. What can you say about the value of $T_2$ for that car ?
\item A car such that $T_2=5$ doesn't meet the regulations. What can you say about the value of $T_1$ for that car ?
\end{enumerate}


\end{document}
