<jupyter_start><jupyter_text>An in-class interactive demo on uncertaintyEveryone in class will use the stopwatch on their phone to measure time between Start and Stop.We will watch these three videosEnter your data here along with : https://goo.gl/npNx1J<jupyter_code>from IPython.display import HTML
HTML("""
<div align="middle">
<video controls>
      <source src="/intro-exp-phys-book/images/start_stop_animation.m4v" type="video/mp4">
</video></div>""")
HTML("""
<div align="middle">
<video controls>
      <source src="/intro-exp-phys-book/images/start_stop_animation_with_countdown_movie.m4v" type="video/mp4">
</video></div>""")
HTML("""
<div align="middle">
<video controls>
      <source src="/intro-exp-phys-book/images/start_stop_animation_with_double_countdown.m4v" type="video/mp4">
</video></div>""")<jupyter_output><empty_output><jupyter_text>Now let's analyze the dataThe Data is here: https://goo.gl/npNx1JWe will just copy and paste it from google docs into this notebook<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
temp1 = """
7.48
7.62
7.59
7.55
7.5
7.53
7.56
7.88
7.5
7.63
7.59
7.55
7.62
7.32
7.58
7.8
7.53
7.59
7.54
7.84
8.71
7.6
7.61
7.57
7.52
7.66
7.89
"""
temp2 = """
7.84
7.62
7.8
7.66
7.6
7.63
7.9
7.66
7.73
7.58
7.62
7.69
8.21
7.57
7.56
7.72
7.66
7.53
7.83
7.7
7.71
7.65
7.72
7.72
7.84
7.89
7.83
"""
# you can split the lines into a list, but entries are still treated like text
temp1.split()
# here we will convert into numpy arrays 
x1 = np.array(temp1.split()).astype(np.float)
x1
x2 = np.array(temp2.split()).astype(np.float)
x2
# We can also plot data. 
# What are the horizontal and vertical axes?
# Is this a good way to display the data?
plt.plot(x1)
plt.plot(x2)
# An alternate pesentation
plt.hist(x1, bins=30)
np.mean(x1)
np.std(x1)
np.mean(x2)
np.std(x2)
plt.hist(x2, bins=30)
plt.scatter(x1,x2)
plt.xlim()
x1.size, x2.size
mybins = np.linspace(7.4,8.5,20)
plt.hist(x1, bins=mybins, alpha=.3,label='first')
plt.hist(x2, bins=mybins, alpha=.3,label='second')
plt.legend()
plt.xlabel('time')
plt.ylabel('counts')
plt.xlim(7.3,7.8)
plt.ylim(7.3,7.8)
plt.scatter(x1,x2)
plt.axvline(x=7.5)
plt.axhline(y=7.5)
plt.Line2D([7.5, 7.5], [7.3, 7.8], linewidth=2)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16688978134761268, 'fraction_numerical': 0.09861668897813476, 'mean_word_length': 4.415458937198068, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '228472', 'license': 'MIT', 'n_tokens_mistral': 1069, 'n_tokens_neox': 983, 'n_words': 234, 'path': '_site/content/timing_example.ipynb', 'repo_name': 'cranmer/intro-exp-phys-book', 'size': '2241'}