function insurance_least_squares ( )

  data = load ( 'insurance_data.txt' );

  age = data(:,1);
  sex = data(:,2);
  bmi = data(:,3);
  kid = data(:,4);
  smo = data(:,5);
  bil = data(:,7);

  n = length ( age );

  A = zeros ( n, 6 );
  A(:,1) = ones(n,1);
  A(:,2) = age;
  A(:,3) = sex;
  A(:,4) = bmi;
  A(:,5) = kid;
  A(:,6) = smo;

  c = A \ bil;

  fprintf ( 1, '  c1       = %g\n', c(1) );
  fprintf ( 1, '  c2 (age) = %g\n', c(2) );
  fprintf ( 1, '  c3 (sex) = %g\n', c(3) );
  fprintf ( 1, '  c4 (bmi) = %g\n', c(4) );
  fprintf ( 1, '  c5 (kid) = %g\n', c(5) );
  fprintf ( 1, '  c6 (smo) = %g\n', c(6) );

  e = sum ( ( bil - c(1) - c(2) * age - c(3) * sex - c(4) * bmi - c(5) * kid - c(6) * smo ).^2 );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Sum-of-squares error = %g\n', e );

  return
end
