Jul 2014 – Present Mexico City

I primarily work in a project for biodiversity monitoring based on large scale in situ collections of sound, photographs, and videos.

Responsibilities include:

  • Advise and participate in the development of statistical models, for example, the modeling of ecological integrity with Bayesian belief networks.
  • Develop R packages and shiny applications meant to analyze sounds, to generate automatic reports, and to visualize the information stored in our databases.



Jan 2014 – Present Mexico City

Courses Taught:

Undergraduate Thesis Advisor:

  • Andres Sanudo. Analysis of the demand for parking space in Mexico City, BSc in Mathematics, 2015.
  • Beatriz Ambia. Conjoint analysis case study with Stan, BSc in Mathematics, 2019.


Data Analyst


Jun 2009 – Mar 2011 Mexico City

LQL is a consulting firm focused in marketing research and predictive modeling.

Responsibilities include:

  • Performed analysis of survey data (market segmentation, conjoint analysis) and participated in survey design.
  • Designed and implemented automatic reports for survey based studies.
  • Developed computational tools in R and Python to improve the efficiency of the analysis area.


We adapted the semi-mechanistic Bayesian hierarchical model of COVID-19 epidemiological dynamics found in Flaxman et al. (2020) to produce state-level estimates of the number of infections and the time-varying reproduction number (the expected number of secondary cases caused by each infected individual) as a function of human mobility. Here we explain the model in detail and the assumptions made for Mexico and here we show state-level estimates. We also published an article in the Mexican newspaper Nexos explaining the model results here.

In Mexico quick-counts take place whenever major elections take place. For the quick-counts a probabilistic sample of polling stations is selected in advance and estimates are presented in the election night. The complete samples are rarely available to publish the results in a timely manner hence the results are announced using partial samples which have biases. We developed a Bayesian hierarchical model that includes demographic and geographic covariates, the model reduces the biases associated to such covariates. Here we explain the model in detail and here is an R package with the model implementation, and here is a published paper with the methodology for one of the models we used.


I teach a course in Computational Statistics for the master programs in Data Science and in Computer Science at ITAM. Felipe González and I developed the syllabus and I developed (and yearly update) the class notes. Here is the latest course site and here is the GitHub repository with the class notes.

In 2014 and 2015, I taught a course in Multivariate Statistics (covering Bayesian Networks, Markov Random Fields HMMs, hierarchical models,..) for the master program in Data Science at ITAM. Felipe González and I developed the syllabus and the class notes. I am in the process of updating the course resources, here is the course site and here is a Github repository with class notes.

Notes for a 3-4 day introductory workshop to R for data analysis. Here is the workshop site and here is the GitHub repository. I have taught this workshop (sometimes as part of a larger program) at ITAM, CONABIO, SAI, OXFAM Mexico, GNP and COLMEX.

I taught a course in Exploratory Data Analysis and Survey Sampling for bachelors in Mathematics and Actuarial Sciences at ITAM. I am in the process of uploading the material (developed by Felipe Gonzalez).

Recent & Upcoming Talks

I participated as instructor for the CDSB’s 2020 workshop, held remotely.

A demo (in spanish) of data analysis with R, featuring how to import, transform, and plot data in R.

In this talk, I share our experience using R in the Mexican electoral quick count, I highlight the importance of reproducibility for …

I participated as instructor for the CDSB’s runconf, held at Cuernavaca.

A review of probability with simulation and an introduction to Bayesian Networks with R.