Add more links and purple comet story
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Anthony Wang 2023-12-20 05:16:26 +00:00
parent 665af3a187
commit e75488a9bd
Signed by: a
SSH key fingerprint: SHA256:B5ADfMCqd2M7d/jtXDoihAV/yfXOAbWWri9+GdCN4hQ

View file

@ -103,7 +103,7 @@ test(100, 50, 10)
Much better! Try testing out some other values of $N, M, A$ to see what happens.
Also, using math lingo, $p(x)$ is actually the cumulative distribution for the beta distribution, so we can also use SageMath's built-in functions to compute $k$ instead of writing out all the factorials and stuff.
Also, using math lingo, $p(x)$ is actually the cumulative distribution for the beta distribution, so we can also use SageMath's [built-in functions](https://doc.sagemath.org/html/en/reference/probability/sage/probability/probability_distribution.html#sage.probability.probability_distribution.RealDistribution.cum_distribution_function) to compute $k$ instead of writing out all the factorials and stuff.
{{< rawhtml >}}
<div class="sage"><script type="text/x-sage">from sage.symbolic.integration.integral import definite_integral
@ -133,4 +133,6 @@ test(100, 50, 10)
As you can see, our own implementation still has some precision issues, and doesn't quite match the results from using SageMath's beta distribution, but it's better than our first attempt. Lesson learned: leave numerical computation to the experts and use the built-in functions whenever possible.
Anyways, that's all for this post, which may have actually been an excuse to mess around with [KaTeX](https://katex.org/) and [SageMathCell](https://sagecell.sagemath.org/). If you want to see more fun with SageMathCell, check out [this nice article](https://grossack.site/2023/11/08/37-median.html) about why 37 is the median value for the second prime factor of an integer!
Fun story about SageMath: I participated in the Purple Comet math team contest a few years ago, and this contest has a [bizarre rule](https://purplecomet.org/?action=information/showrules) where you're allowed to use computers as long as you don't access the internet. Thus, I just wrote a ton of SageMath code and blasted through the problems, and somehow one year, my school's team got all the questions correct and tied for first place.
Anyways, that's all for this post, which may have actually been an excuse to mess around with [KaTeX](https://katex.org/) and [SageMathCell](https://sagecell.sagemath.org/). I've been using [Typst](https://typst.app/) (less boilerplate!) and [WolframAlpha](https://www.wolframalpha.com/) a lot lately and nearly forgot how to use LaTeX and SageMath, so this blog post took a lot of trial and error. Oh, and if you want to see more fun with SageMathCell, check out [this nice article](https://grossack.site/2023/11/08/37-median.html) about why 37 is the median value for the second prime factor of an integer!