{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Pendulum problem\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import numpy as np" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "#### Data\n", "\n", "Data for pendulum swings:\n", "+ Standard deviation for any set of timing measurements $= 0.04\\, \\mbox{s}$\n", "+ Experiment A: 12 sets of 10 swings; average time for 10 swings $T_{10} = 28.39\\, \\mbox{s}$\n", "+ Experiment B: 1 set of 120 swings; time for 120 swings $T_{120} = 340.61\\, \\mbox{s}$\n", "\n", "#### Period from Experiment A:\n", "The standard error (standard deviation of the mean) for the time for 10 swings is \n", "$$ \\alpha = \\frac{\\sigma}{\\sqrt{N}} = \\frac{0.04}{\\sqrt{12}} $$\n", "The time for one swing is the time for 10 swings divided by 10:\n", "\\begin{eqnarray*}\n", "T_{1} &=& \\frac{T_{10}}{10}\\\\\n", " &=& \\frac{28.39 \\pm \\frac{0.04}{\\sqrt{12}}}{10}\\\\\n", " &=& 2.839 \\pm \\frac{0.04}{10\\sqrt{12}}\\\\\n", " &=& 2.839 \\pm 0.001155\n", "\\end{eqnarray*}\n", "The presentation form of this result is \n", "$$ T_1 = 2.839\\pm 0.001\\, \\mbox{s}. $$" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T1 = 2.839 +/- 0.0011547005383792516\n" ] } ], "source": [ "t10 = 28.39\n", "alpha10 = 0.04/np.sqrt(12)\n", "t1 = t10/10\n", "alpha1 = alpha10/10\n", "\n", "print('T1 =',t1,'+/-',alpha1)\n" ] }, { "cell_type": "markdown", "metadata": { "collapsed": true }, "source": [ "#### Period from Experiment B:\n", "The standard error (standard deviation of the mean) for the time for 120 swings is \n", "$$ \\alpha = \\frac{\\sigma}{\\sqrt{N}} = \\frac{0.04}{\\sqrt{1}} $$\n", "The time for one swing is the time for 120 swings divided by 120:\n", "\\begin{eqnarray*}\n", "T_{1} &=& \\frac{T_{120}}{120}\\\\\n", " &=& \\frac{340.61 \\pm \\frac{0.04}{1}}{120}\\\\\n", " &=& 2.838417 \\pm \\frac{0.04}{120\\sqrt{1}}\\\\\n", " &=& 2.838417 \\pm 0.000333\n", "\\end{eqnarray*}\n", "The presentation form of this result is \n", "$$ T_1 = 2.8384\\pm 0.0003\\, \\mbox{s}. $$" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "T1 = 2.838416666666667 +/- 0.0003333333333333333\n" ] } ], "source": [ "t120 = 340.61\n", "alpha120 = 0.04/np.sqrt(1)\n", "t1 = t120/120\n", "alpha1 = alpha120/120\n", "\n", "print('T1 =',t1,'+/-',alpha1)" ] }, { "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.7.8" } }, "nbformat": 4, "nbformat_minor": 2 }