Week 7 Homework - Common Errors Summary
Week 7 Homework - Common Errors Summary
Document Date: Week 7 Homework Assessment
Purpose: Summary of recurring mistakes to present to students in class
π Overall Statistics
- Total students assessed: 20
- Passing (β₯50%): 18 students (90%)
- Partial (<50%): 2 students
- Incorrect submission: 1 student (wrong homework assignment)
- Critical error frequency: Missing steady-state reference lines affected 15+ students
π΄ Critical Error #1: Missing Steady-State Reference Lines on Plots
Error Description:
Most students plotted the transition paths of k_t and y_t/A_t but did not include horizontal reference lines showing the steady-state levels for each scenario.
Wrong Implementation:
% Plot k_t for three scenarios
figure;
for i = 1:3
n = scenarios(i,1);
g = scenarios(i,2);
[k, y, c, A] = simulate_growth_tech(alpha, s, delta, n, g, k0, A0, T);
plot(1:T, k, 'LineWidth', 1.5); hold on;
end
xlabel('Time'); ylabel('k_t');
title('Transition paths of k_t');
legend('n=0,g=0','n=0.01,g=0.02','n=0.02,g=0.03');
% β WRONG: No steady-state reference lines!
Correct Implementation:
% Plot k_t for three scenarios WITH steady-state lines
figure;
for i = 1:3
n = scenarios(i,1);
g = scenarios(i,2);
[k, y, c, A] = simulate_growth_tech(alpha, s, delta, n, g, k0, A0, T);
plot(1:T, k, 'LineWidth', 1.5); hold on;
% Calculate and plot steady-state reference line
k_star = (s / (delta + n + g + n*g))^(1/(1-alpha));
yline(k_star, '--', sprintf('k* (n=%.2f, g=%.2f)', n, g), ...
'LabelHorizontalAlignment','left');
end
xlabel('Time'); ylabel('k_t');
title('Transition paths of k_t');
legend('n=0,g=0','n=0.01,g=0.02','n=0.02,g=0.03','Location','best');
grid on;
% β
CORRECT: Steady-state lines included for visual comparison
Why This Is Critical:
- Homework explicitly requires steady-state reference lines on both plots
- Visual comparison of convergence paths to target levels
- Demonstrates understanding of steady-state calculations
- Makes it clear how different
(n, g)combinations affect steady-state levels - Frequency: Affected 15+ students (most common error, ~75% of submissions)
π΄ Error #2: Missing Steady-State Summary Output
Error Description:
Many students calculated steady-state values but did not print them to the command window or create a summary table.
Wrong Implementation:
% Calculate steady states but don't print
for i = 1:3
n = scenarios(i,1);
g = scenarios(i,2);
k_star = (s / (delta + n + g + n*g))^(1/(1-alpha));
y_star = k_star^alpha;
% β WRONG: Values calculated but never displayed
end
Correct Implementation:
% Calculate and PRINT steady states
fprintf('\nSteady State Analysis:\n');
fprintf('=====================\n');
for i = 1:3
n = scenarios(i,1);
g = scenarios(i,2);
k_star = (s / (delta + n + g + n*g))^(1/(1-alpha));
y_star = k_star^alpha;
fprintf('Scenario %d: n=%.3f, g=%.3f\n', i, n, g);
fprintf(' Steady-state k* = %.4f\n', k_star);
fprintf(' Steady-state (y/A)* = %.4f\n', y_star);
fprintf('\n');
end
% β
CORRECT: Quantitative summary provided
Why This Matters:
- Provides quantitative backing for interpretation
- Makes it easy to compare steady-state levels across scenarios
- Explicit homework requirement
- Demonstrates understanding of steady-state calculations
- Frequency: Affected 12+ students (~60% of submissions)
π Error #3: Missing Steady-State Lines on y_t/A_t Plot
Error Description:
Some students added steady-state reference lines to the k_t plot but forgot to add them to the y_t/A_t plot.
Wrong Implementation:
% Plot k_t with steady-state lines β
figure(1);
for i = 1:3
[k, y, c, A] = simulate_growth_tech(...);
plot(1:T, k); hold on;
k_star = ...;
yline(k_star, '--'); % β
Has steady-state line
end
% Plot y_t/A_t WITHOUT steady-state lines β
figure(2);
for i = 1:3
[k, y, c, A] = simulate_growth_tech(...);
plot(1:T, y./A); hold on;
% β WRONG: Missing yline for (y/A)*
end
Correct Implementation:
% Plot y_t/A_t WITH steady-state lines
figure(2);
for i = 1:3
[k, y, c, A] = simulate_growth_tech(...);
plot(1:T, y./A); hold on;
% Calculate and plot steady-state for y/A
k_star = (s / (delta + n + g + n*g))^(1/(1-alpha));
yA_star = k_star^alpha; % (y/A)* = k*^alpha
yline(yA_star, '--', sprintf('(y/A)* (n=%.2f, g=%.2f)', n, g));
end
% β
CORRECT: Both plots have steady-state reference lines
Why This Matters:
- Homework requires steady-state lines on both plots
- Visual consistency across figures
- Complete analysis of per-effective-worker variables
- Frequency: Affected 8+ students (~40% of submissions)
π Error #4: Figures Saved to Wrong Location
Error Description:
Saving figures to the root directory instead of a Figures/ folder.
Wrong Implementation:
figure;
plot(...);
saveas(gcf, 'k_paths.png'); % β WRONG: Saves to current directory
saveas(gcf, 'yA_paths.png');
Correct Implementation:
% Create Figures folder if it doesn't exist
if ~exist('Figures','dir')
mkdir('Figures');
end
figure;
plot(...);
saveas(gcf, fullfile('Figures', 'k_paths.png')); % β
CORRECT
saveas(gcf, fullfile('Figures', 'yA_paths.png'));
% OR
exportgraphics(gcf, fullfile('Figures', 'k_paths.png'), 'Resolution', 300);
Why This Matters:
- Organization: all figures in one location
- Cleaner workspace
- Easier to find and review figures
- Professional code structure
- Frequency: Affected 5-6 students (~25-30% of submissions)
π Error #5: Incorrect or Incomplete Convergence Speed Discussion
Error Description:
Some students incorrectly stated that higher n and g slow down convergence, or did not explain the mechanism.
Wrong Interpretation:
% β WRONG Interpretation:
% When g > 0, convergence becomes slower because the economy
% needs more time to adjust to the new steady state.
Correct Interpretation:
% β
CORRECT Interpretation:
% Higher n and g increase the effective depreciation rate
% (delta + n + g + n*g), which creates a stronger restoring
% force. This makes the economy converge FASTER to its steady
% state. The denominator (1+n)(1+g) in the law of motion
% increases the rate at which capital per effective worker
% adjusts toward k*.
Why This Matters:
- Demonstrates understanding of the economic mechanism
- Correct interpretation of the model dynamics
- Shows comprehension of effective depreciation concept
- Frequency: Affected 3-4 students (~15-20% of submissions)
π‘ Error #6: Re-running Function Instead of Storing Results
Error Description:
Calling simulate_growth_tech() multiple times for the same scenario instead of storing results and reusing them.
Inefficient Implementation:
% First loop: plot k_t
for i = 1:3
[k, y, c, A] = simulate_growth_tech(...);
plot(1:T, k); hold on;
end
% Second loop: plot y_t/A_t (re-runs function!)
for i = 1:3
[k, y, c, A] = simulate_growth_tech(...); % β INEFFICIENT: Re-runs
plot(1:T, y./A); hold on;
end
Efficient Implementation:
% Store results in arrays/cells
k_results = zeros(T, 3);
y_results = zeros(T, 3);
A_results = zeros(T, 3);
for i = 1:3
[k, y, c, A] = simulate_growth_tech(...);
k_results(:, i) = k;
y_results(:, i) = y;
A_results(:, i) = A;
end
% Reuse stored results for plotting
figure(1);
for i = 1:3
plot(1:T, k_results(:, i)); hold on;
end
figure(2);
for i = 1:3
plot(1:T, y_results(:, i) ./ A_results(:, i)); hold on;
end
% β
EFFICIENT: Function called once per scenario
Why This Matters:
- More efficient code (avoids redundant calculations)
- Demonstrates good programming practice
- Easier to modify and extend
- Frequency: Affected 4-5 students (~20-25% of submissions)
π‘ Error #7: Wrong Parameters
Error Description:
Using parameters that donβt match the homework specification.
Wrong Parameters:
T = 50; % β WRONG: Should be T = 80
k0 = 0.5; % β WRONG: Should be k0 = 3.1201
Correct Parameters:
T = 80; % β
CORRECT: As specified in homework
k0 = 3.1201; % β
CORRECT: As specified in homework
A0 = 1; % β
CORRECT
alpha = 0.4;
delta = 0.1;
s = 0.3;
Why This Matters:
- Enables direct comparison with reference solutions
- Ensures consistent results across students
- Homework explicitly specifies these values
- Frequency: Affected 2-3 students (~10-15% of submissions)
π‘ Error #8: Missing Interpretation or Incomplete Discussion
Error Description:
Not providing written comments addressing both homework questions, or providing incomplete interpretation.
Required Elements:
% Interpretation should address:
% 1. How do higher n and g affect steady-state levels
% of k* and (y/A)* per effective worker?
% 2. What happens to convergence speed when g > 0?
Good Example:
% Interpretation:
% 1. Steady-state effects:
% - Higher n and g increase the effective depreciation
% term (delta + n + g + n*g), which reduces both
% k* and (y/A)* per effective worker.
% - Population growth dilutes capital across more workers.
% - Technology growth increases effective labor, requiring
% more capital to maintain the same capital per effective worker.
%
% 2. Convergence speed:
% - Higher n and g increase convergence speed because
% they raise effective depreciation, creating a stronger
% restoring force toward steady state.
% - The denominator (1+n)(1+g) in the law of motion
% accelerates adjustment.
Why This Matters:
- Explicit homework requirement
- Demonstrates understanding of economic mechanisms
- Shows ability to interpret model results
- Frequency: Affected 2-3 students (~10-15% of submissions)
π‘ Error #9: Function Embedded in Script Instead of Separate File
Error Description:
Defining simulate_growth_tech as a nested function or at the end of the main script instead of in a separate .m file.
Acceptable but Not Ideal:
% Main script
clear; close all; clc;
% ... parameters ...
% Function defined at end of script
function [k, y, c, A] = simulate_growth_tech(...)
% ... function body ...
end
% β οΈ ACCEPTABLE but not ideal - should be separate file
Preferred:
% Main script: week7_homework.m
clear; close all; clc;
% ... parameters ...
% Calls simulate_growth_tech.m (separate file)
% Separate file: simulate_growth_tech.m
function [k, y, c, A] = simulate_growth_tech(...)
% ... function body ...
end
% β
PREFERRED: Separate, reusable function file
Why This Matters:
- Better code organization
- Function can be reused across scripts
- Easier to test and debug
- Matches homework structure expectations
- Frequency: Affected 2-3 students (~10-15% of submissions)
π Good Practices Observed
β Excellent Implementations:
- Complete steady-state overlays: Several students included
ylineon both plots with proper labels - Comprehensive summaries: Many students printed steady-state values in formatted tables
- Efficient code: Several students stored results and reused them for plotting
- Professional figure management: Most students saved figures properly in
Figures/folder - Clear interpretation: Many students provided thorough, well-structured interpretation comments
β Strong Code Organization:
- Separate function files (
simulate_growth_tech.m) - Good documentation and comments
- Proper preallocation of arrays
- Organized output with formatted
fprintfstatements - Cell arrays or matrices for storing multiple scenario results
β Good Mathematical Understanding:
- Correct steady-state formula:
k* = (s / (delta + n + g + n*g))^(1/(1-alpha)) - Proper understanding of effective depreciation concept
- Correct interpretation of convergence speed mechanisms
- Recognition that higher
nandgreduce steady-state levels but increase convergence speed
β Outstanding Features:
- Some students included half-life convergence analysis
- Comprehensive output with steady-state comparisons
- Professional figure styling with proper labels, legends, and grid
- Multiple figure formats (PNG and PDF) saved
- Bonus analysis (e.g., convergence speed plots)
π― Key Teaching Points for Class Discussion
1. Steady-State Reference Lines
- Always include
ylineoverlays on bothk_tandy_t/A_tplots - Calculate steady states using:
k* = (s / (delta + n + g + n*g))^(1/(1-alpha)) - Use
(y/A)* = k*^alphafor output per effective worker - Label lines clearly to identify each scenario
- Makes convergence paths visually comparable to target levels
2. Steady-State Summary Output
- Always print steady-state values using
fprintfor create a table - Provides quantitative backing for interpretation
- Makes it easy to compare across scenarios
- Demonstrates understanding of calculations
3. Convergence Speed Interpretation
- Higher
nandgincrease convergence speed (not decrease) - Mechanism: higher effective depreciation creates stronger restoring force
- The denominator
(1+n)(1+g)in the law of motion accelerates adjustment - This is counterintuitive but mathematically correct
4. Code Efficiency
- Store simulation results in arrays/cells during first loop
- Reuse stored results for plotting instead of re-running function
- More efficient and demonstrates good programming practice
5. File Organization
- Create
Figures/directory at start of script withmkdirguard - Always save figures to
Figures/folder, not current directory - Use
fullfile()for cross-platform compatibility - Save in appropriate formats (PNG, PDF, or both)
6. Complete Interpretation
- Address both homework questions explicitly:
- How
nandgaffect steady-state levels per effective worker - What happens to convergence speed
- How
- Use per-effective-worker perspective for conclusions
- Explain the economic mechanisms, not just state results
π Grade Distribution Summary
- β More than 50% Correct: 18 students (90%)
- β οΈ Partial <50% Correct: 2 students (10%)
- β Incorrect/Incomplete: 1 student (wrong homework assignment)
Most common grade: β (Passing)
Key takeaway: Most students demonstrated solid understanding of the Solow model with technological change and population growth. The most common issue was missing steady-state reference lines on plots (~75% of submissions), followed by missing steady-state summary output (~60%). Overall performance was strong, with 90% of students passing the homework. The main areas for improvement are visual completeness (steady-state lines) and quantitative summaries.
π‘ Recommendations for Future Classes
- Emphasize steady-state reference lines - Make it explicit that BOTH plots need
ylineoverlays - Provide example of complete plots - Show template with steady-state lines clearly marked
- Highlight steady-state summary requirement - Provide structure/guidelines for
fprintfoutput - Clarify convergence speed mechanism - Explain why higher
nandgincrease (not decrease) convergence speed - Include file organization checklist - Ensure
Figures/folder creation and proper saving - Encourage result storage - Show efficient pattern of storing and reusing simulation outputs
- Provide interpretation template - Give structure for addressing both homework questions
π Excellent Submission Examples
Outstanding Features Observed:
- Complete Visual Analysis:
- Steady-state lines on both plots with clear labels
- Professional figure styling with proper formatting
- Both PNG and PDF formats saved
- High-quality figures with grid and legends
- Comprehensive Quantitative Summary:
- Formatted
fprintfoutput with steady-state values - Comparison tables across scenarios
- Clear presentation of results
- Formatted
- Excellent Interpretation:
- Directly addresses both homework questions
- Thoughtful discussion of economic mechanisms
- Correct understanding of convergence speed
- Clear explanation of steady-state effects
- Advanced Features:
- Half-life convergence analysis (observed in some submissions)
- Bonus convergence speed plots
- Comprehensive formatted output tables
- Efficient code with stored results
π Comparison with Previous Weeks
Week 5 vs Week 6 vs Week 7:
- Week 5: More critical algorithmic errors (bisection function value updates) - 81% pass rate
- Week 6: Errors more about completeness (timing, plots) - 100% pass rate
- Week 7: Errors primarily about visual completeness (steady-state lines) and summaries - 90% pass rate
- Week 7 students demonstrated good understanding of model economics but need improvement on presentation completeness
- Week 7 errors are easier to fix (add lines, print values) vs Week 5βs fundamental algorithm issues
Common theme across weeks:
- Missing deliverables (figures, summaries, lines) rather than fundamental errors
- Good understanding of core concepts but incomplete implementation
- Need for better attention to homework requirements checklist