\authorandnumber{Carlos Rodriguez}
\problemdate{Wed Sep 02 2009 16:03:30 GMT-0400 (Eastern Daylight Time)}
\textbook{Statistics by Freedman, Pisani and Purves}
\partname{Reading Histograms}
\chaptername{Histograms}
\begin{problem}
\score{1}
Cut and paste the following code into R.


\begin{verbatim}
barplot(c(1,4,3,0.5),c(20,20,30,30),space=0,
  col=c("white","gray","white","white"),
  main="Histogram of Exam Scores", xlab="Score Points")
axis(1)
\end{verbatim}


Look at the generated picture.
If there were 150 students taking the Exam, how many
scored between 20 and 40 points?

\begin{choice}
\gooditem{58.5}
\baditem{39}
\baditem{50}
\baditem{48.5}
\baditem{60.5}
\end{choice}


\begin{longanswer}
You may want to again Cut and Paste the following into R.


\begin{verbatim}
# ANSWERS:
# 1) Compute the areas of the blocks
A = c(2,8,9,1.5)

# Change to percents:
percA = 100*A/sum(A)

# Finally get the corresponding percentage from the total of 150 students
Ans1 = percA[2]*150/100

# so about 58 or 59.

\end{verbatim}
\end{longanswer}
\end{problem}
