<< Chapter < Page Chapter >> Page >

Exercise 2.2

Suppose you have set the goal of making an A in your math class. If your class grades consist of 4 tests, and you have made a 98, 80, and 90 on your first three tests, what do you need to make on your last test so that the mean of your grades is 90?

Exercise 2.3

(for the advanced) Suppose that, for the same class, you have already computed the mean of the first three tests when you receive your fourth test grade. Instead of computing the mean of all four tests from scratch, it's possible to update the mean that you've already computed. Write a Matlab code that takes two inputs, the mean of your first three tests and the grade of your fourth test, and computes the mean of all four tests.

Variance and standard deviation

As you saw in "Example 2.2" , the mean is not always representative of the data, and other measures are needed to analyze the spread of the data. The variance is a measure of the distance of each number from the mean. Given a vector x of n numbers and mean value x ¯ , the variance of x is given by

var ( x ) = 1 n - 1 k = 1 n ( x k - x ¯ ) 2 = ( x 1 - x ¯ ) 2 + ( x 2 - x ¯ ) 2 + . . . + ( x n - x ¯ ) 2 n - 1 .

The standard deviation of the data is related to the variance and is given by

std ( x ) = var ( x ) .

You can compute the variance and standard deviation of x in Matlab by typing the commands var(x) and std(x).

Example 3.1

Consider the vector given in "Example 2.1" , x = [1, 7, 2, 5, 9, 6]. Recall that the mean of x = 5.

var ( x ) = ( 1 - 5 ) 2 + ( 7 - 5 ) 2 + ( 2 - 5 ) 2 + ( 5 - 5 ) 2 + ( 9 - 5 ) 2 + ( 6 - 5 ) 2 5 = 9 . 2
std ( x ) = var ( x ) 3 . 03

Example 3.2

Consider the data from "Example 2.2" , where the mean x ¯ = 300. The variance is

var ( x ) = 16 · ( 100 - 300 ) 2 + 3 · ( 900 - 300 ) 2 + ( 1700 - 300 ) 2 13 193 , 684

and the standard deviation is

std ( x ) = ( var ( x ) ) 440

Because the standard deviation is considerably larger than the mean, the variance tells us that the mean is not very representative of the data.

Exercise 3.1

Compute the variance and standard deviation of y = [3, 8, 2, 5, 5, 7], using both the formulas and the Matlab commands.

Exercise 3.2

Suppose that in the situation of "Example 2.2" , there are 50 general exmployees instead of 16. Compute the mean and variance of the daily salary. Is the mean more or less representative of the data than it was in Example 2.2?


Although the mean, variance, and standard deviation provide information about the data, it is often useful to visualize the data. A histogram is a tool that allows you to visualize the proportion of numbers that fall within a given bin, or interval. To compute the histogram of a set of data, x , follow the algorithm below.

  1. Choose the bin size Δ x . The bins are the intervals [0, Δ x ], ( Δ x , 2 Δ x ], (2 Δ x , 3 Δ x ], and so on.
  2. For each bin, count the number of data points that lie within the bin.
  3. Create a bar graph showing the number of data points within each bin.

Example 4.1

Consider again the vector from "Example 2.1" , x = [1, 7, 2, 5, 9, 6]. Using a bin size Δ x = 2, there are 5 bins.

  • Bin 1 = [0, 2] has 2 elements of x
  • Bin 2 = (2, 4] has 0 elements of x
  • Bin 3 = (4, 6] has 2 elements of x
  • Bin 4 = (6, 8] has 1 element of x
  • Bin 5 = (8, 10] has 1 element of x

In Matlab, you can plot the histogram of a vector x by typing hist(x). Matlab will automatically use 10 bins. If you'd like to specify the bin centers, type hist(x,c), where c is a vector of bin centers. The histogram of "Example 4.1" was generated by the Matlab command hist(x, [1, 3, 5, 7, 9]).

Exercise 4.1

Plot the histogram of the vector y = [3, 8, 2, 5, 5, 7], both on paper and in Matlab.

Exercise 4.2

Plot the histogram of the daily salaries from "Example 2.2" . For this example, does the histogram or the mean give you a better idea of what salary you would be making if you got the job?

Questions & Answers

find the 15th term of the geometric sequince whose first is 18 and last term of 387
Jerwin Reply
I know this work
The given of f(x=x-2. then what is the value of this f(3) 5f(x+1)
virgelyn Reply
hmm well what is the answer
how do they get the third part x = (32)5/4
kinnecy Reply
can someone help me with some logarithmic and exponential equations.
Jeffrey Reply
sure. what is your question?
okay, so you have 6 raised to the power of 2. what is that part of your answer
I don't understand what the A with approx sign and the boxed x mean
it think it's written 20/(X-6)^2 so it's 20 divided by X-6 squared
I'm not sure why it wrote it the other way
I got X =-6
ok. so take the square root of both sides, now you have plus or minus the square root of 20= x-6
oops. ignore that.
so you not have an equal sign anywhere in the original equation?
is it a question of log
I rally confuse this number And equations too I need exactly help
But this is not salma it's Faiza live in lousvile Ky I garbage this so I am going collage with JCTC that the of the collage thank you my friends
Commplementary angles
Idrissa Reply
im all ears I need to learn
right! what he said ⤴⤴⤴
what is a good calculator for all algebra; would a Casio fx 260 work with all algebra equations? please name the cheapest, thanks.
Kevin Reply
a perfect square v²+2v+_
Dearan Reply
kkk nice
Abdirahman Reply
algebra 2 Inequalities:If equation 2 = 0 it is an open set?
Kim Reply
or infinite solutions?
The answer is neither. The function, 2 = 0 cannot exist. Hence, the function is undefined.
Embra Reply
if |A| not equal to 0 and order of A is n prove that adj (adj A = |A|
Nancy Reply
rolling four fair dice and getting an even number an all four dice
ramon Reply
Kristine 2*2*2=8
Bridget Reply
Differences Between Laspeyres and Paasche Indices
Emedobi Reply
No. 7x -4y is simplified from 4x + (3y + 3x) -7y
Mary Reply
how do you translate this in Algebraic Expressions
linda Reply
Need to simplify the expresin. 3/7 (x+y)-1/7 (x-1)=
Crystal Reply
. After 3 months on a diet, Lisa had lost 12% of her original weight. She lost 21 pounds. What was Lisa's original weight?
Chris Reply
what's the easiest and fastest way to the synthesize AgNP?
Damian Reply
types of nano material
abeetha Reply
I start with an easy one. carbon nanotubes woven into a long filament like a string
many many of nanotubes
what is the k.e before it land
what is the function of carbon nanotubes?
I'm interested in nanotube
what is nanomaterials​ and their applications of sensors.
Ramkumar Reply
what is nano technology
Sravani Reply
what is system testing?
preparation of nanomaterial
Victor Reply
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
Himanshu Reply
good afternoon madam
what is system testing
what is the application of nanotechnology?
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
anybody can imagine what will be happen after 100 years from now in nano tech world
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
silver nanoparticles could handle the job?
not now but maybe in future only AgNP maybe any other nanomaterials
I'm interested in Nanotube
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
can nanotechnology change the direction of the face of the world
Prasenjit Reply
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
Ali Reply
the Beer law works very well for dilute solutions but fails for very high concentrations. why?
bamidele Reply
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
QuizOver.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, The art of the pfug. OpenStax CNX. Jun 05, 2013 Download for free at http://cnx.org/content/col10523/1.34
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'The art of the pfug' conversation and receive update notifications?