Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added challenger case study to 15
  • Loading branch information
rcc02007 committed Oct 15, 2019
1 parent 33c1264 commit 3b1fa91
Show file tree
Hide file tree
Showing 7 changed files with 2,261 additions and 0 deletions.
Binary file added 15_challenger-logistic/.Newtint.m.swp
Binary file not shown.
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 2
}
2,197 changes: 2,197 additions & 0 deletions 15_challenger-logistic/15_logistic-regression_challenger.ipynb

Large diffs are not rendered by default.

34 changes: 34 additions & 0 deletions 15_challenger-logistic/Newtint.m
@@ -0,0 +1,34 @@
function yint = Newtint(x,y,xx)
% Newtint: Newton interpolating polynomial
% yint = Newtint(x,y,xx): Uses an (n - 1)-order Newton
% interpolating polynomial based on n data points (x, y)
% to determine a value of the dependent variable (yint)
% at a given value of the independent variable, xx.
% input:
% x = independent variable
% y = dependent variable
% xx = value of independent variable at which
% interpolation is calculated
% output:
% yint = interpolated value of dependent variable

% compute the finite divided differences in the form of a
% difference table
n = length(x);
if length(y)~=n, error('x and y must be same length'); end
b = zeros(n,n);
% assign dependent variables to the first column of b.
b(:,1) = y(:); % the (:) ensures that y is a column vector.
for j = 2:n
for i = 1:n-j+1
b(i,j) = (b(i+1,j-1)-b(i,j-1))/(x(i+j-1)-x(i));
end
end
%b
% use the finite divided differences to interpolate
xt = 1;
yint = b(1,1);
for j = 1:n-1
xt = xt*(xx-x(j));
yint = yint+b(1,j+1)*xt;
end
24 changes: 24 additions & 0 deletions 15_challenger-logistic/challenger_oring.csv
@@ -0,0 +1,24 @@
Flight#,Temp,O-Ring Problem
1,53,1
2,57,1
3,58,1
4,63,1
5,66,0
6,66.8,0
7,67,0
8,67.2,0
9,68,0
10,69,0
11,69.8,1
12,69.8,0
13,70.2,1
14,70.2,0
15,72,0
16,73,0
17,75,0
18,75,1
19,75.8,0
20,76.2,0
21,78,0
22,79,0
23,81,0
Binary file added 15_challenger-logistic/newton_interpolation.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 15_challenger-logistic/octave-workspace
Binary file not shown.

0 comments on commit 3b1fa91

Please sign in to comment.