randFromArray([ 5, 6 ])
$.map( new Array( NUM_STUDENTS ), function() { return randRange( 12, 20 ) * 5; } ) $.map( new Array( NUM_STUDENTS ), function() { return randRange( 12, 20 ) * 5; } ) $.map( new Array( NUM_STUDENTS ), function( e, n ) { return FINAL[ n ] - MIDTERM[ n ]; } ) $.map( IMPROVEMENT, function( x ) { return x > 0 ? 1 : null; }).length sortNumbers(IMPROVEMENT)[4] === sortNumbers(IMPROVEMENT)[3] false

Use the graph to answer the question:

init({ range: [ [ -2, NUM_STUDENTS * 3 + 2 ], [ -3, 12 ] ], scale: [ 24, 24 ] }); for ( var y = 1; y <= 10; ++y ) { label( [ 0, y ], y * 10, "left", false ); style({ stroke: "#000", strokeWidth: 1, opacity: 0.2 }, function() { line( [ 0, y ], [ NUM_STUDENTS * 3 + 1, y ] ) }); } for ( var index = 0; index < NUM_STUDENTS; ++index ) { style({ stroke: "none", fill: "#9ab8ed", opacity: 1.0 }); path([ [ index * 3 + 1, 0 ], [ index * 3 + 1, MIDTERM[ index ] / 10 ], [ index * 3 + 2, MIDTERM[ index ] / 10 ], [ index * 3 + 2, 0 ], [ index * 3 + 1, 0 ] ]); style({ stroke: "none", fill: "#ffc966", opacity: 1.0 }); path([ [ index * 3 + 2, 0 ], [ index * 3 + 2, FINAL[ index ] / 10 ], [ index * 3 + 3, FINAL[ index ] / 10 ], [ index * 3 + 3, 0 ], [ index * 3 + 2, 0 ] ]); style({ opacity: 1.0 }); label( [ index * 3 + 2, 0 ], person( index + 1 ), "below", false ); } style({ stroke: "#000", strokeWidth: 2, opacity: 1.0 }); line( [ 0, 0 ], [ NUM_STUDENTS * 3 + 1, 0 ] ); line( [ 0, 0 ], [ 0, 10 ] ); label( [ ( NUM_STUDENTS * 3 + 1 ) / 2, -0.8 ], $._("Student"), "below", false ).css('font-weight', 'bold'); label( [ -1.5, 5 ], "Score (points)", "center", false ).addClass( "rotate" ) .css('font-weight', 'bold'); label( [ ( NUM_STUDENTS * 3 + 1 ) / 2, 10.5 ], $._("Scores on Midterm and Final Exams"), "above", false ).css('font-weight', 'bold'); style({ stroke: "none", fill: "#9ab8ed", opacity: 1.0 }); path([ [ 0, -2 ], [ 0.5, -2 ], [ 0.5, -2.5 ], [ 0, -2.5 ], [ 0, -2 ] ]); style({ stroke: "#000", strokeWidth: 2, opacity: 1.0 }); label( [ 0.5, -2.25 ], $._("Midterm"), "right", false ); style({ stroke: "none", fill: "#ffc966", opacity: 1.0 }); path([ [ 3, -2 ], [ 3.5, -2 ], [ 3.5, -2.5 ], [ 3, -2.5 ], [ 3, -2 ] ]); style({ stroke: "#000", strokeWidth: 2, opacity: 1.0 }); label( [ 3.5, -2.25 ], $._("Final"), "right", false );
randRange( 0, 1 ) [ $._("midterm"), $._("final exam") ][ COLUMN ] COLUMN === 0 ? mean( MIDTERM ) : mean( FINAL )

What was the average student score for the TEST?

AVERAGE

Use the key to figure out which of the two bars shows the scores for the TEST.

style({ stroke: PINK, fill: "none", strokeWidth: 2 }); ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );

Find each of the TEST scores represented by the blue orange bars.

if ( COLUMN === 0 ) { label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" }); } else { label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" }); }

To find the average student score, add up the individual scores and divide by the number of students.

`\dfrac{plus.apply( null, COLUMN === 0 ? MIDTERM : FINAL )}{NUM_STUDENTS} = \dfrac{sum( COLUMN === 0 ? MIDTERM : FINAL )}{NUM_STUDENTS} = AVERAGE`

The average student score on the TEST was `AVERAGE`.

true mean( MIDTERM ) mean( FINAL ) [$._("Midterm"), $._("Final exam"), $._("Same on both")] MIDTERM_AVG > FINAL_AVG ? 0 : ( MIDTERM_AVG < FINAL_AVG ? 1 : 2 )

On average, did the students do better on the midterm or the final exam?

ANSWERS[ANSWER]

- ANS

Find each of the midterm scores represented by the blue bars.

label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" });

To find the average student score on the midterm, add up the individual scores and divide by the number of students.

`\dfrac{plus.apply( null, MIDTERM )}{NUM_STUDENTS} = \dfrac{sum( MIDTERM )}{NUM_STUDENTS} = MIDTERM_AVG`

The average student score on the midterm was `MIDTERM_AVG`.

Find each of the final exam scores represented by the orange bars.

label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" });

To find the average student score on the final exam, add up the individual scores and divide by the number of students.

`\dfrac{plus.apply( null, FINAL )}{NUM_STUDENTS} = \dfrac{sum( FINAL )}{NUM_STUDENTS} = FINAL_AVG`

The average student score on the final exam was `FINAL_AVG`.

The average student score was higher on the midterm than on the final exam.

The average student score was higher on the final exam than the midterm.

The average student score was the same on both the midterm and the final exam.

randRange( 0, 1 ) [ $._("midterm"), $._("final exam") ][ COLUMN ] COLUMN === 0 ? median( MIDTERM ) : median( FINAL )

What was the median score for the TEST?

MEDIAN

Use the key to figure out which of the two bars shows the scores for the TEST.

style({ stroke: PINK, fill: "none", strokeWidth: 2 }); ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );

Find each of the TEST scores represented by the blue orange bars.

`\qquad\large{( COLUMN === 0 ? MIDTERM : FINAL ).join(", ")}`

if ( COLUMN === 0 ) { label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" }); } else { label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" }); }

Put the TEST scores in order from least to greatest.

`\qquad\large{sortNumbers( COLUMN === 0 ? MIDTERM : FINAL ).join(", ")}`

Since there are an odd number of scores, the median score is just the middle score.

Since there are an even number of scores, the median score is the average of the two middle scores.

`\dfrac{ COLUMN === 0 ? sortNumbers( MIDTERM )[ NUM_STUDENTS / 2 - 1 ] : sortNumbers( FINAL )[ NUM_STUDENTS / 2 - 1 ] + COLUMN === 0 ? sortNumbers( MIDTERM )[ NUM_STUDENTS / 2 ] : sortNumbers( FINAL )[ NUM_STUDENTS / 2 ] }{2} = MEDIAN`

The median score on the TEST was `MEDIAN`.

randRange( 0, 1 ) [ $._("midterm"), $._("final exam") ][ COLUMN ] COLUMN === 0 ? mode( MIDTERM ) : mode( FINAL )

What was the mode for the TEST scores?

MODE

Use the key to figure out which of the two bars shows the scores for the TEST.

style({ stroke: PINK, fill: "none", strokeWidth: 2 }); ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );

Find each of the TEST scores represented by the blue orange bars.

if ( COLUMN === 0 ) { label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" }); } else { label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" }); }

The mode is the most frequently occurring score.

`MODE` is the most frequently occurring score.

if ( COLUMN === 0 ) { if ( MIDTERM[ INDEX ] === MODE ) { ellipse( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 - 0.5 ], [ 0.8, 0.6 ] ); } } else { if ( FINAL[ INDEX ] === MODE ) { ellipse( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 - 0.5 ], [ 0.8, 0.6 ] ); } }
randRange( 0, 1 ) [ $._("midterm"), $._("final exam") ][ COLUMN ] COLUMN === 0 ? Math.min.apply( null, MIDTERM ) : Math.min.apply( null, FINAL ) COLUMN === 0 ? Math.max.apply( null, MIDTERM ) : Math.max.apply( null, FINAL ) MAX - MIN

What is the range of the TEST scores?

RANGE

The range is the difference between the largest value and the smallest value.

Use the key to figure out which of the two bars shows the scores for the TEST.

style({ stroke: PINK, fill: "none", strokeWidth: 2 }); ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );

Find the largest and smallest TEST scores represented by the blue orange bars.

if ( COLUMN === 0 ) { if ( MIDTERM[ INDEX ] === MIN || MIDTERM[ INDEX ] === MAX ) { label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" }); } } else { if ( FINAL[ INDEX ] === MIN || FINAL[ INDEX ] === MAX ) { label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" }); } }

The smallest TEST score is `MIN`. The largest TEST score is `MAX`.

Find the range by subtracting the smallest score from the largest score.

`\qquad MAX - MIN = RANGE`

The range of TEST scores is `RANGE`.

randRange( 0, 1 ) [ $._("midterm"), $._("final exam") ][ COLUMN ] COLUMN === 0 ? Math.min.apply( null, MIDTERM ) : Math.min.apply( null, FINAL ) COLUMN === 0 ? Math.max.apply( null, MIDTERM ) : Math.max.apply( null, FINAL ) (MAX + MIN) / 2

What is the midrange of the TEST scores?

MIDRANGE

The midrange is halfway between the largest value and the smallest value.

Use the key to figure out which of the two bars shows the scores for the TEST.

style({ stroke: PINK, fill: "none", strokeWidth: 2 }); ellipse( [ COLUMN * 3 + 1.2, -2.25 ], [ 1.5, 0.5 ] );

Find the largest and smallest TEST scores represented by the blue orange bars.

if ( COLUMN === 0 ) { if ( MIDTERM[ INDEX ] === MIN || MIDTERM[ INDEX ] === MAX ) { label( [ INDEX * 3 + 1.5, MIDTERM[ INDEX ] / 10 + 0.2 ], MIDTERM[ INDEX ], "below", false ).css({ fontWeight: "bold" }); } } else { if ( FINAL[ INDEX ] === MIN || FINAL[ INDEX ] === MAX ) { label( [ INDEX * 3 + 2.5, FINAL[ INDEX ] / 10 + 0.2 ], FINAL[ INDEX ], "below", false ).css({ fontWeight: "bold" }); } }

The smallest TEST score is `MIN`. The largest TEST score is `MAX`.

Find the midrange by averaging the smallest and largest scores.

`\qquad \dfrac{MIN + MAX}{2} = MIDRANGE`

The midrange of TEST scores is `MIDRANGE`.