Skip to content

Commit

Permalink
Merge branch 'mle-exercises'
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo Hentschker committed Jul 9, 2018
2 parents 6cc280b + 926e13a commit 8a96e2f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions notebooks/lectures/Random_Variables/answers/notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
"output_type": "stream",
"text": [
"The JB test p-value is: 0.923015693884\n",
"We accept the hypothesis that the data are normally distributed False\n",
"We reject the hypothesis that the data are normally distributed False\n",
"The skewness of the returns is: -0.102081900914\n",
"The kurtosis of the returns is: 3.07608657316\n"
]
Expand All @@ -530,7 +530,7 @@
"cutoff = 0.01\n",
"_, p_value, skewness, kurtosis = stattools.jarque_bera(returns)\n",
"print \"The JB test p-value is: \", p_value\n",
"print \"We accept the hypothesis that the data are normally distributed \", p_value < cutoff\n",
"print \"We reject the hypothesis that the data are normally distributed \", p_value < cutoff\n",
"print \"The skewness of the returns is: \", skewness\n",
"print \"The kurtosis of the returns is: \", kurtosis"
]
Expand Down
4 changes: 2 additions & 2 deletions notebooks/lectures/Random_Variables/answers/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -14592,7 +14592,7 @@ <h1 id="Exercise-4:-Financial-Applications:">Exercise 4: Financial Applications:
<span class="n">cutoff</span> <span class="o">=</span> <span class="mf">0.01</span>
<span class="n">_</span><span class="p">,</span> <span class="n">p_value</span><span class="p">,</span> <span class="n">skewness</span><span class="p">,</span> <span class="n">kurtosis</span> <span class="o">=</span> <span class="n">stattools</span><span class="o">.</span><span class="n">jarque_bera</span><span class="p">(</span><span class="n">returns</span><span class="p">)</span>
<span class="k">print</span> <span class="s">&quot;The JB test p-value is: &quot;</span><span class="p">,</span> <span class="n">p_value</span>
<span class="k">print</span> <span class="s">&quot;We accept the hypothesis that the data are normally distributed &quot;</span><span class="p">,</span> <span class="n">p_value</span> <span class="o">&lt;</span> <span class="n">cutoff</span>
<span class="k">print</span> <span class="s">&quot;We reject the hypothesis that the data are normally distributed &quot;</span><span class="p">,</span> <span class="n">p_value</span> <span class="o">&lt;</span> <span class="n">cutoff</span>
<span class="k">print</span> <span class="s">&quot;The skewness of the returns is: &quot;</span><span class="p">,</span> <span class="n">skewness</span>
<span class="k">print</span> <span class="s">&quot;The kurtosis of the returns is: &quot;</span><span class="p">,</span> <span class="n">kurtosis</span>
</pre></div>
Expand All @@ -14612,7 +14612,7 @@ <h1 id="Exercise-4:-Financial-Applications:">Exercise 4: Financial Applications:

<div class="output_subarea output_stream output_stdout output_text">
<pre>The JB test p-value is: 0.923015693884
We accept the hypothesis that the data are normally distributed False
We reject the hypothesis that the data are normally distributed False
The skewness of the returns is: -0.102081900914
The kurtosis of the returns is: 3.07608657316
</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@
"\n",
"\n",
"print \"The JB test p-value is: \", p_value\n",
"print \"We accept the hypothesis that the data are normally distributed \", p_value < cutoff\n",
"print \"We reject the hypothesis that the data are normally distributed \", p_value < cutoff\n",
"print \"The skewness of the returns is: \", skewness\n",
"print \"The kurtosis of the returns is: \", kurtosis"
]
Expand Down
2 changes: 1 addition & 1 deletion notebooks/lectures/Random_Variables/questions/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -12157,7 +12157,7 @@ <h1 id="Exercise-4:-Financial-Applications:">Exercise 4: Financial Applications:


<span class="k">print</span> <span class="s">&quot;The JB test p-value is: &quot;</span><span class="p">,</span> <span class="n">p_value</span>
<span class="k">print</span> <span class="s">&quot;We accept the hypothesis that the data are normally distributed &quot;</span><span class="p">,</span> <span class="n">p_value</span> <span class="o">&lt;</span> <span class="n">cutoff</span>
<span class="k">print</span> <span class="s">&quot;We reject the hypothesis that the data are normally distributed &quot;</span><span class="p">,</span> <span class="n">p_value</span> <span class="o">&lt;</span> <span class="n">cutoff</span>
<span class="k">print</span> <span class="s">&quot;The skewness of the returns is: &quot;</span><span class="p">,</span> <span class="n">skewness</span>
<span class="k">print</span> <span class="s">&quot;The kurtosis of the returns is: &quot;</span><span class="p">,</span> <span class="n">kurtosis</span>
</pre></div>
Expand Down

0 comments on commit 8a96e2f

Please sign in to comment.