Commit 388fb65b by Paktalin

Section 5 is done

parent 11ae7dfa
...@@ -182,13 +182,6 @@ ...@@ -182,13 +182,6 @@
"plt.imshow(255 - im, cmap='gray')\n", "plt.imshow(255 - im, cmap='gray')\n",
"plt.show()" "plt.show()"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {
......
{
"cells": [
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"from scipy.stats import norm\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.3989422804014327"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"norm.pdf(0)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.03520653267642995"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"norm.pdf(0, loc=5, scale=10)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0.34427719, 0.38355058, 0.37368751, 0.37774103, 0.28487339,\n",
" 0.38220885, 0.23882119, 0.36822956, 0.39686933, 0.38577969])"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"r = np.random.randn(10)\n",
"norm.pdf(r)"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([-1.06630816, -0.95828377, -0.98433536, -0.97354641, -1.25571044,\n",
" -0.96178809, -1.43204019, -0.99904872, -0.9241482 , -0.95248884])"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"norm.logpdf(r)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0.7064003 , 0.38953997, 0.64119472, 0.37051938, 0.7940906 ,\n",
" 0.38485887, 0.15552604, 0.65552315, 0.45934851, 0.39780302])"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"norm.cdf(r)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([-0.3475732 , -0.94278879, -0.4444221 , -0.99284953, -0.23055771,\n",
" -0.95487857, -1.86094212, -0.42232166, -0.77794609, -0.92179832])"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"norm.logcdf(r)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment