1
6.31 The percent of households that own at least one computer in selected years from 1981 to 2010,
according to the U.S. census bureau, is listed in the following table:
Year 1981 1984 1989 1993 1997 2000 2001 2003 2004 2010
Household with computer [%] 0.5 8.2 15 22.9 36.6 51 56.3 61.8 65 76.7
The data can be modeled with a function in the form H C = C ⁄ ( 1 + Ae –Bx ) (logistic equation), where H C
is percent of households that own at least one computer, C is a maximum value for H C , A and B are con-
stants, and x is the number of years after 1981. By using the method described in Section 6.3 and assuming
that C = 90 , determine the constants A and B such that the function best fit the data. Use the function to
estimate the percent of ownership in 2008 and in 2013. In one figure, plot the function and the data points.
Solution
Rewriting the equation:
ln ------- – 1 = – Bx + ln A
C C
------- – 1 = Ae – Bx or
HC HC
This gives linear relation between ln ------- – 1 and x.
C
HC
The problem is solved in the following script file:
clear, clc,
C=90;
Y=[1981 1984 1989 1993 1997 2000 2001 2003 2004 2010];
H=[0.5 8.2 15 22.9 36.6 51 56.3 61.8 65 76.7];
Hy=log(C./H-1);
[a1,a0] = LinearRegression(Y, Hy);
B=-a1
A=exp(a0)
% Estimated ownership in 2008
Hc=@ (t) C./(1+A*exp(-B*t));
Hc2008=Hc(2008)
% Plot
Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.
2
Tp=1981:0.5:2010;
Hcp=Hc(Tp);
plot(Tp,Hcp,Y,H,'*')
xlabel('Year')
ylabel('Household with Computers (%)')
When the script is executed the following results are displayed in the Command Window, and the follow-
ing figure is displayed.
B =
0.2084
A =
9.5718e+180
Hc2008 =
77.5804
90
80
70
Household with Computers (%)
60
50
40
30
20
10
0
1980 1985 1990 1995 2000 2005 2010
Year
Excerpts from this work may be reproduced by instructors for distribution on a not-for-profit basis
for testing or instructional purposes only to students enrolled in courses for which the textbook
has been adopted. Any other reproduction or translation of this work beyond that permitted by
Sections 107 or 108 of the 1976 United States Copyright Act without the permission of the
copyright owner is unlawful.