This course covers basic statistical principles that are widely useful for the analysis of neuroscience and behavioral data, such as error bars and confidence intervals, multivariate probability distributions, regression and classification, linear and nonlinear models, cross-validation, bootstrapping, and model selection.
PSYCH 216A: Lectures
Kendrick Kay
Final project

Date: 06/05/2012
Description:
The final project is to write a MATLAB tutorial or blog post on a topic in statistics, data analysis or modeling. We urge you to choose a topic that is relevant for your own research. The topic you choose should have some general applicability and should not just be analyzing your own data with the tools we have taught you. However you are welcome to use your own data as an example in the tutorial/blog or you can write a simulation based on fabricated data (as we have been doing in class). You should turn in your code as a single .m file and a folder of HTML files generated from you code using the matlab “publish” function. It is ok to work in groups of 2 or 3 but every member of the group must participate in the final presentation of the tutorial. If you have questions or need guidance email one of the instructors.
Further Information:
Kendrick Kay
Lecture 9: Real-world examples

Date: 29/05/2012
Description:
Example on-the-fly analysis using student supplied data.
Further Information:
Kendrick Kay
Lecture 8: Classification

Date: 22/05/2012
Description:
– Linear classification models, or linear classifiers
– Nonlinear classification models, or nonlinear classifiers
– Logistic regression
– Linear discriminant analysis (LDA)
– Support vector machines (SVM)
– Nearest-prototype classification
– Nearest-neighbor classifiers
Further Information:
Kendrick Kay
Lecture 7: Discussion questions

Date: 15/05/2012
Description:
If appropriate, write MATLAB code and make figures to accompany your answer. See notes for questions.
Kendrick Kay
Lecture 6: Model reliability

Date: 08/05/2012
Description:
1. The basics of model reliability
2. Error bars on parameter estimates
– bootstrapping
– Jackknifing
– Split- half analysis
3. Parameter estimates may have correlated errors
4. The distinction between accuracy and reliability
Further Information:
MATLAB tutorial (utility: randnmulti.m)
Kendrick Kay
Lecture 5: Model accuracy

Date: 01/05/2012
Description:
1. The basics of model accuracy
2. Coefficient of determination (R2)
3. Accuracy on the sample vs. accuracy on the population
4. Cross-validation
5. Model selection
6. Overfitting
7. Simple models vs. complex models
Further Information:
Kendrick Kay
Lecture 4: Model fitting

Date: 04/24/2012
Description:
1. The basics of model fitting
2. The case of linear models
3. The case of nonlinear models
4. The motivation for squared error
5. An alternative error metric: absolute error
Further Information:
Kendrick Kay
Lecture 3: Model specification

Date: 17/04/2012
Description:
1. Correlation is a simple case of model building
2. Overview of model building
3. Supervised vs. unsupervised learning
4. Regression vs. classification
5. Linear models
6. Nonlinear models
7. Linearized models
8. Parametric nonlinear models
9. Nonparametric nonlinear models
10. Summary of model types
11. Matrix representation of linear models
Further Information:
Kendrick Kay
(Stanford)
Lecture 2: Hypothesis testing and correlation

Date: 04/10/2012
Description:
1. Exploring a more complex dataset: one variable, two conditions
2. Nonparametric alternatives to the t-test
3. Exploring a more complex dataset: two variables, one condition
4. Correlation
5. Error bars and p-values on correlation
Kendrick Kay
(Stanford)
Lecture 1: Probability distributions and error bars

Date: 03/04/2012
Description:
1. Exploring a simple dataset: one variable, one condition
2. Probability distributions
3. Error bars
4. Nonparametric approaches to error bars
5. Nonparametric approaches to probability distributions
- Kendrick Kay » Final project
- Kendrick Kay » Lecture 9: Real-world examples
- Kendrick Kay » Lecture 8: Classification
- Kendrick Kay » Lecture 7: Discussion questions
- Kendrick Kay » Lecture 6: Model reliability
- Kendrick Kay » Lecture 5: Model accuracy
- Kendrick Kay » Lecture 4: Model fitting
- Kendrick Kay » Lecture 3: Model specification
- Kendrick Kay » Lecture 2: Hypothesis testing and correlation
- Kendrick Kay » Lecture 1: Probability distributions and error bars
PSYCH 216A: Tutorials
Franco Pestilli & Jason Yeatman
PSYCH 216A: Matlab Tutorial No. 7 - Classification

Description:
This matlab tutorial is intended to complement lecture #8. This tutorial will cover classification based on logistic regression models.
Further Information:
Video coming soon…
Franco Pestilli & Jason Yeatman
PSYCH 216A: Matlab Tutorial No. 6 - Model Reliability

Description:
Previous lectures have covered how to specify a model, fit a model and test the accuracy of a model. This tutorial will focus on using bootstrapping to quantify the reliability of the parameter estimates of our model. By reliability we essentially mean putting error bars on the parameter estimates. In tutorial 1 we used bootstrapping to put error bars on estimates of the mean and median. In tutorial 2 we used bootstrapping to put error bars on correlation coefficients. We will now see that this same principal can be extended to just about any other type of model.
Further Information:
Video coming soon…
Franco Pestilli & Jason Yeatman
PSYCH 216A: Matlab Tutorial No. 5 - Model accuracy

Description:
This matlab tutorial is intended to complement PSYCH 216A lecture #5.
We will show how to:
(1) use cross-validation to estimate R2 and reduce data over-fitting.
(2) Use cross-validation to estimate an R2 for two models and select the most accurate model
Further Information:
Video coming soon…
Franco Pestilli & Jason Yeatman
PSYCH 216A: Matlab Tutorial No. 4 - Model fitting

Description:
This Matlab tutorial is intended to complement PSYCH 216A lecture #4.
This tutorial will give an introduction to linear and non-linear fitting procedures. It covers the basic algebra of linear regression and compares the solutions from ordinary least squares regression to the solutions obtained from a non-linear fitting procedure.
Franco Pestilli & Jason Yeatman
PSYCH 216A: Matlab Tutorial No. 3 Model specification

Description:
This matlab tutorial is intended to complement PSYCH 216A lecture #3.
We will cover in detail the following sections of Lecture 3:
1. Section 5, Linear models.
2. Section 7, Linearized models.
3. Section 9, Non parametric nonlinear models; nearest neighbors.
We will cover procedures for fitting these models in future tutorials.
Further Information:
Video coming soon…
Franco Pestilli & Jason Yeatman
Matlab Tutorial No. 2: Hypothesis testing and correlation

Description:
This Matlab tutorial is intended to complement PSYCH216A lecture #2.
In this tutorial we will show how to:
1. Explore datasets with one variable and two conditions
2. Implement nonparametric alternatives to the t-test
3. Explore datasets with two variables and one condition
4. Compute the Pearson correlation coefficients
5. Establish the error of the estimate, using bootstrap.
6. Test hypotheses on the correlation between two variables, using bootstrap.
7. Use Montecarlo Methods to test hypotheses.
Further Information:
Video coming soon!
Franco Pestilli & Jason Yeatman
Matlab Tutorial No. 1: Probability distributions and error bars

Description:
This Matlab tutorial is intended to compliment PSYCH216A lecture #1.
We will implement some basics concepts of data summary.
(1) Exploring a simple data set
(2) Probability distributions
(3) Error bars
(4) Non-parametric approaches to error bars
Further Information:
Coming soon!
- Franco Pestilli & Jason Yeatman » Classification
- Franco Pestilli & Jason Yeatman » Model Reliability
- Franco Pestilli & Jason Yeatman » Model accuracy
- Franco Pestilli & Jason Yeatman » Model fitting
- Franco Pestilli & Jason Yeatman » Model specification
- Franco Pestilli & Jason Yeatman » Hypothesis testing and correlation
- Franco Pestilli & Jason Yeatman » Probability distributions and error bars