Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

3. A land-use planner observed that in a city the number of gas stations (y) in

ID: 3184711 • Letter: 3

Question

3. A land-use planner observed that in a city the number of gas stations (y) in relation to the opulation (x) could be described by Equation (1) were and are curve fitting parameters. quation (I) can be converted into the equivalent linear form shown in Equation (2). Using the ata below and the equivalent linear form of the equation, find the values of and using gression analysis. What is the expected number of gas stations for a city with a population of 200 people? In y = In +Ar Population ( Number of Gas Stations (y 1000 5000 2000 3500 4000 500 6000 2500 7000 1500 4 14 7 10 17 27

Explanation / Answer

matlab code

close all
clear
clc

x = 1000*[1 5 2 3.5 4 0.5 6 2.5 7 1.5];
y = [4 14 5 7 10 2 17 6 27 5];
lny = log(y)';
A = ones(length(x),2);
A(:,1) = x';
% A*[beta; lnalpha] = lny
consts = pinv(A)*lny;
beta = consts(1)
alpha = exp(consts(2))

xx = input('Enter random x: ');
yy = alpha*exp(beta*xx);
fprintf('Predicted y: %d ', round(yy));

output

beta =
3.4292e-04
alpha =
2.4086
Enter random x: 5200
Predicted y: 14

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote