Skip to content

Instantly share code, notes, and snippets.

@parthi2929
parthi2929 / sampling distributions
Created September 13, 2018 18:02
Illustrating sampling distributions..
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"toc": true
},
"source": [
"<h1>Table of Contents<span class=\"tocSkip\"></span></h1>\n",
"<div class=\"toc\"><ul class=\"toc-item\"><li><span><a href=\"#Sampling-Distribution-of-Sample-Proportions\" data-toc-modified-id=\"Sampling-Distribution-of-Sample-Proportions-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>Sampling Distribution of Sample Proportions</a></span><ul class=\"toc-item\"><li><span><a href=\"#Gumballs\" data-toc-modified-id=\"Gumballs-1.1\"><span class=\"toc-item-num\">1.1&nbsp;&nbsp;</span>Gumballs</a></span><ul class=\"toc-item\"><li><span><a href=\"#Setup\" data-toc-modified-id=\"Setup-1.1.1\"><span class=\"toc-item-num\">1.1.1&nbsp;&nbsp;</span>Setup</a></span></li><li><span><a href=\"#Statistical-Outcomes:\" data-toc-modified-id=\"Statistical-Outcomes:-1.1.2\"><span class=\"toc-item-num\">1.1.2&nbsp;&nbsp;</span>Statistical Outcomes:</a></span></li><li><span><a href=\"#Notations-and-Conditions\" data-to
@parthi2929
parthi2929 / ipy2tex_converter.tplx
Created September 25, 2018 18:02
My jinja2 template for customized latex format from nbconvert..
%((*- extends 'style_ipython.tplx' -*))
% 1. CHANGE DOCUMENTCLASS TO STANDALONE
((* block docclass *))
\documentclass[float=false, crop=false, 11pt]{standalone}
((* endblock docclass *))
% 2. REMOVE PREAMBLE AND REPLACE WITH STYLE FILE INCLUSION
@parthi2929
parthi2929 / boxing_a_verbatim_via_env.tex
Created September 25, 2018 18:33
Boxing a verbatim via new environment in latex. Box to look similar to ipython notebook. MWE.
\documentclass[10pt,a4paper]{article}
\usepackage[latin1]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{calc}
\usepackage{fancyvrb} % verbatim replacement that allows latex
\usepackage[breakable]{tcolorbox}
@parthi2929
parthi2929 / 24_confidence_intervals_shallow_examples.ipynb
Created September 27, 2018 08:58
The draft version to illustrate the image issue.. tikz output image is normal sized in notebook but shrinked too much in latex output
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# MLE for Normal Distribution\n",
"\n",
"\n",
"$$\n",
@parthi2929
parthi2929 / Fixed; MLE for Normal distribution
Created October 20, 2018 05:59
Here are the fixed graphs (both plotly and matplotlib's)
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# MLE for Normal Distribution\n",
"\n",
"\n",
"$$\n",
@parthi2929
parthi2929 / Supplementary 1 - Interactive Visualization of MLE for Normal Distribution
Created October 20, 2018 11:06
It is currently impossible to offer interactivity inside pdf, so these supplementary sections are created to provide a better grasp of the concepts. Here, we try to illustrate MLE for normal distribution, which is often either plotted in 1D or not shown at all in textbooks,.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The Maximum Likelihood Estimation of a Normal distribution involves two parameters $(\\mu, \\sigma^2)$ which we will here by refer to as $(\\theta_1, \\theta_2)$. Since the likelihood function involves two parameters, to visualize it, a 3D graph is needed. In this section, we will generate a 3D graph, for viewers to interact with it and have a look around it. Since this interactivity is not possible in pdf, this material stays as html separately. \n",
"\n",
"This section is not about explaining the related concepts, they are covered in the theoretical part, from which you found this reference. This section only focusses on the formula we try to graph, and how do we generate the graph (in python). We will also do not deal with any further derivation of finding the maxima. We will just stop with graphing it. The vision is, once this is possible, any one could use it as base, to illustrate many more complex 2D Likelihoo
@parthi2929
parthi2929 / Supplementary 2 - Interactive Visualization of Simple Regression Model
Last active October 25, 2018 13:51
Using plot.ly an interactive 3D graph of log likelihood function of a sample set (x,y) is drawn and its maximum found, only to prove that, in fact that happens to provide us, the best fit regression line.
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Simple Regression Model"
]
},
{
@parthi2929
parthi2929 / covariance deformation cross check.ipynb
Created November 3, 2018 04:13
A sample proof to show both general and deformed formula of Covariance give same result
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@parthi2929
parthi2929 / INCOMPLETE - Interactive Visualization of Correlation via Regression.ipynb
Created November 10, 2018 13:29
INCOMPLETE - Interactive Visualization of Correlation via Regression
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.