Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SDSP = Sample Distribution of Sample Proportions | |
| # This is helper file for programmatic illustrations of SDSP concepts. | |
| from random import shuffle | |
| import pandas as pd | |
| import numpy as np | |
| from math import sqrt, pi | |
| def create_bernoulli_population(N, p): | |
| """ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from random import shuffle | |
| import matplotlib.pyplot as plt | |
| from SDSPSM import get_metrics | |
| from random import choices, seed | |
| from math import sqrt, pi | |
| def create_bernoulli_population(T, p): | |
| y_freq = int(p*T) | |
| y_pops = [1]*y_freq | |
| o_freq = int((1-p)*T) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "This is simpler version by [Adam](https://www.linkedin.com/in/adam-sherwin-9202018/) in order to help me fix the problem [here](https://math.stackexchange.com/questions/2886986/confidence-intervals-inconsistent-statistical-results). His code is [here](https://gist.github.com/absherwin/9ea495333f3f269c6edec3ac7dd0b978)\n", | |
| "\n", | |
| "## Test 1: \n", | |
| "\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sourcefile = r"../../test.ipynb" # file to be converted | |
| with open(sourcefile) as nb_file: | |
| nb_contents = nb_file.read() | |
| import nbformat | |
| # Convert using the ordinary exporter | |
| notebook = nbformat.reads(nb_contents, as_version=4) | |
| # create a configuration object to extract figures as files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "### Create Population" | |
| ] | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "Try converting this page to latex and compile using pdflatex..\n", | |
| "\n", | |
| "\\begin{equation}\n", | |
| "\\color {blue}{\n", |