Econ Stats Lab PDF
Econ Stats Lab PDF
Therefore, my bins would be:
62-65 66-69 70-73 74-77 78-81 82-85 86-89 90-93 94-97 98-101
Notice that I ended up with 10 bins because I needed an additional bin in order to reach 98. Youll find yourself
making minor adjustments (like adding another bin) when you construct frequency distributions. Thats to be
expected.
Finally, the ten bins that I ended up with are perfectly fine but you may prefer to use bins that look nicer. When I
re-did my bins by starting at 60 rather than 62 and making my bin width 5, I ended up with the following 8 bins:
60-64 65-69 70-74 75-79 80-84 85-89 90-94 95-99
Again, minor adjustments like this are both common and good practice.
5. Complete your frequency distribution by counting the number of observations in each bin.
Terminology:
[65 - 69] 69.5 [70 - 74] 74.5 [75 - 79]
Class midpoint/mark =
70 74 69.5 74.5
69.5 0.5(74.5 69.5)
2 2
or or
Class interval/width = 79.5 69.5 10
lower class
boundary
upper class
boundary
class limits
3
How to create a frequency distribution and histogram with Excel:
1. In any column, type in the upper limits of your class intervals. For example, lets imagine that I
want to count the number of social science courses completed by each student in Econ 103/Soc
190. I choose the following intervals for organizing and summarizing the data that I collect
from students:
0 1
2 3
4 5
6 7
8 9
10 11
Note: For most data, somewhere between 6-15 intervals (or bins) is a good number. Be sure to
construct equal-width intervals otherwise your frequency distribution and histogram can be
easily misunderstood or misinterpreted.
2. Type the upper limits of your chosen intervals in any Excel column:
1
3
5
7
9
11
3. Go to Tools > Data Analysis > Histogram (Make sure that Analysis ToolPak is checked,
otherwise you won't be able to use the HISTOGRAM function. To activate the Analysis
ToolPak, go to Tools > Add-Ins and check the box for Analysis ToolPak. Different versions
of Excel have different procedures for activating the Analysis ToolPak. If these steps do not
work, search online for the correct steps for the version of Excel that you are using.
4. For Input range, type in the first and last cell containing your data. Lets say you typed the
number of courses taken by individual students in column A, starting with A1 and ending in
A60 (you collected course information from 60 students). For Input range, you would type:
A1:A60
5. For Bin range, type in the first and last cell containing the upper limits of your class intervals.
Lets say you typed these in B1:B6. If you leave this window blank, Excel will automatically
create some class intervals for you.
6. Under New Worksheet Ply, type Freq Dist. This will create a new worksheet in your Excel
file with this name. It will look like Frequency Distribution 1 shown on the next page.
7. IMPORTANT: Re-format the Bin column of your frequency distribution as Text (select the
Bin column, right click, Format Cells > Text. Then change the entries in the Bin column so that
instead of showing just the upper bin limit (e.g., 9) the column now shows both the upper and
lower limits (e.g., 8 9). See Frequency Distribution 2.
4
8. Manually add a Total row. When you have made these changes, your frequency distribution
will look like Frequency Distribution 2.
9. Now you are ready to make your histogram using Excels Chart function:
1) Select your two columns. You can include the header row but do not include the total
row.
2) Go to Insert > Charts > Column. You will see a number of options for the style of your
histogram. For now, lets choose 2-D Column. Excel will then produce Histogram 1.
3) If you have good powers of observation, you will see one thing wrong with this
histogram there should not be spaces between the individual columns.
4) To fix the gap width, right click on any of the columns, choose Format Data Series,
and then change the gap width to 0.
5) To complete your histogram, add a title and labels for the x-axis and y-axis. Your final
histogram will look like Histogram 2.
Frequency distribution 1.
Frequency distribution 2.
Histogram 1. Histogram 2.
!"# $%&'(&#)*
! "!
# "$
$ %
% &
' "
!! !
()*+ ,
!"# $%&'(&#)*
,! "!
"# "$
&$ %
-% &
.' "
!,!! !
/)012 -,
5
!"#$%& '()#& )*++,-."/
mean =aveiage( __ : __ )
meuian =meuian( __ : __ )
moue =moue( __ : __ )
2S
th
peicentile =quaitile( __ : __ , 1)
Su
th
peicentile =quaitile( __ : __ , 2)
7S
th
peicentile =quaitile( __ : __ , S)
9u
th
peicentile =peicentile( __ : __ , u.9)
vaiiance (sample) =vai( __ : __ )
vaiiance (population) =vaip( __ : __ )
stu uev (sample) =stuev( __ : __ )
stu uev (population) =stuevp( __ : __ )
iange =max( __ : __ ) - min( __ : __ )
coiielation =coiiel( __ : __ , __ : __ )
covaiiance (population) =covai( __ : __ , __ : __ )
countif =countif( __ : __ , "<=2u")
ianuom numbei =ianubetween(1,1uu) * Ranuom numbei between 1 anu 1uu.
ianuom numbei =ianu( ) * Ranuom numbei between |u,1).
combination =combin(16,4) * "fiom 16 choose 4"
peimutation =peimut(16,4)
!-inteicept =inteicept( __ : __ , __ : __ )
slope =slope( __ : __ , __ : __ )
slope anu !-inteicept =linest( __ : __ , __ : __ ) * This is calleu an "##"! $%#&'(". You
must select two cells anu then hit CTRL-
SBIFT-ENTER foi it to woik.
6