Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168703
Image: ubuntu2004

Sage Tool 2

This worksheet is designed to be used with Activity 2 in Section 1.2.

Plot the number of daily newspapers in the US (for persons age 18 or older) for the period 1990-2002.

data=[(1990,1611),(1991,1586),(1992,1570),(1993,1556),(1994,1548),(1995,1533),(1996,1520),(1997,1509),(1998,1489),(1999,1483),(2000,1480),(2001,1468),(2002,1457)]
plot1=point(data,pointsize=20) show(plot1,axes_labels=['Year','Newspapers'])
var('t') @interact def _(m=2,b=-2400): L(t)=m*t+b plot2=plot(L,1990,2002,color='red') html('m=%s and b=%s'%(m,b)) html('L(t)=%st+(%s)'%(m,b)) show(plot1+plot2)

 

Determine mm and bb to define your line in the form mt+bmt+b.  Then plot the line together with the data points.  Adjust mm and bb until you think you have the best fit.