Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
February 28, 2014
Lecture 4: Model fitting
1. The basics
- Suppose that we have a set of data and suppose that we have selec
Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
April 11, 2014
Lecture 7: Classification
1. The basics
- We have so far been dealing with regression models. Now that we hav
Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
March 21, 2014
Lecture 5: Model accuracy
1. The basics
- Suppose we have fit a model to a set of data. We would like to know
Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
March 28, 2014
Lecture 6: Model reliability
1. The basics
- Suppose we have fit a model to a set of data. In doing so, we ha
MATLAB Examples 4 (covering Statistics Lecture 7)
Contents
Example 1: Simple 2D classification using logistic regression
Example 2: Compare solutions of different classifiers
Example 1: Simple 2D clas
Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
February 3, 2014
Lecture 2: Hypothesis testing and correlation
1. Exploring a more complex dataset: one variable, two condit
Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
Lecture 1: Probability distributions and error bars
1. Exploring a simple dataset: one variable, one condition
- Let's start
MATLAB Examples 1 (covering Statistics Lectures 1 and 2)
Contents
Example 1: Simple data plotting
Example 2: Monte Carlo simulations of correlation values
Example 3: Use bootstrapping to obtain confid
MATLAB Examples 3 (covering Statistics Lectures 5 and 6)
Contents
Example 1: Demonstration of various types of resampling
Example 2: Bootstrap a simple linear model
Example 3: Perform leave-one-out cr
Solutions to Homework 4 (covering Statistics Lectures 5 and 6)
Contents
Problem 0
Problem 1
Problem 2
Problem 0
load('Homework4.mat');
Problem 1
% define some constants
numboots = 500;
% calculate som
Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
MATLAB Basics II
1. Figures and plotting
figure - create a figure window
hold on - hold figure so that new plot elements wil
Statistics and Data Analysis in MATLAB
Kendrick Kay, [email protected]
MATLAB Basics I
1. The MATLAB environment
- Variables hold things, such as numbers, matrices, strings, etc. Variable names a
Solutions to Homework 2 (covering Statistics Lectures 1 and 2)
Contents
Problem 0
Problem 1
Problem 2
Problem 3
Problem 4
Problem 0
load('Homework2.mat');
Problem 1
% define some stuff
sigma = 10; % s
Solutions to Homework 3 (covering Statistics Lectures 3 and 4)
Contents
Problem 0
Problem 1
Problem 2
Problem 3
Problem 4
Problem 0
load('Homework3.mat');
Problem 1
% construct regressor matrix
X = sc
Solutions to Homework 1: MATLAB Basics
Contents
Problem 0
Problem 1
Problem 2
Problem 3
Problem 4
Problem 5
Problem 0
load('Homework1.mat');
Problem 1
set1 = randn(1,1000);
set2 = randn(1,1000);
figur
Solutions to Homework 5 (covering Statistics Lecture 7)
Contents
Problem 0
Problem 1
Problem 2
Problem 0
load('Homework5.mat');
Problem 1
% visualize the data
figure; hold on;
scatter(score1,pass1,'ko