Course information

  • Instructor: Deepayan Sarkar <deepayan@isid.ac.in>
  • Syllabus:
    • Basics in Programming: flow-charts, logic in programming
    • Common syntax
    • Handling input/output files
    • Sorting
    • Iterative algorithms
    • Simulations from statistical distributions
    • Programming for statistical data analyses: regression, estimation, parametric tests

Projects

See this page.

Teaching material

Code demos

Markdown, LaTeX, etc.

Example files shown in class are available here. See the pandoc website for tools to convert markdown to other formats, inclusing slide shows for presentations.

Assignments

  1. (Due August 10) Implement the false position method (regula falsi) to find the root of an univariate function in R. (Note that this is different from the more complicated secant method).

    Additionally, design and perform a simulation study to understand and describe the sampling distribution of the MLE for the problem discussed in class. Submit R code and a brief report by email.

  2. (Due September 18) For testing the equality of means of two groups, we wish to obtain and compare the power curves of

    • the standard parametric t-test,
    • the Wilcoxon rank-sum test, and
    • a permutation test where the test statistic is the difference in means of the two groups, and the null distribution is induced by randomly permuting the group labels.

    Design and perform a simulation study for this purpose, where the simulated data comes from the Normal distribution with unit variance, and the difference in means varies from -5 to 5. For the sample sizes of the two groups, consider the values (10, 20), (30, 50), and (100, 100).

    Submit R code and a report summarizing your results and observations by email.

  3. (Due October 9) Implement the heapsort algorithm using Rcpp, and compare its runtime with insertion sort and R's built-in sort() (both shell-sort and quick-sort). Submit R and C++ code, along with a brief PDF report summarizing your findings, by email.

  4. (Due October 26) Given an algorithm MEDIAN(A) that returns the index of the median element of A, write an algorithm SELECT(A, i) to find the ith order statistic of A in linear time.