# data[].attributes.body
Fourier Analysis and Timbre: Explore the mathematical analysis of timbre in music. Investigate Fourier analysis and how it can be used to analyze and decompose complex sounds into their constituent harmonics. Examine how the manipulation of harmonic content contributes to the timbral qualities of different musical instruments and sound synthesis techniques.

Transposition between instruments (treble cleff to treble cleff or alto cleff instruments)

Music Data Analysis: Apply mathematical techniques and statistical analysis to explore large datasets of music. Investigate properties such as tempo, pitch distribution, chord progressions, or melodic contours in different musical genres or specific compositions. Utilize data visualization techniques to reveal patterns, trends, or relationships between musical elements.

# data[].attributes.body
symmetry analysis

Knot Complexity and Mathematical Representation: Develop mathematical models to measure the complexity of Celtic knots. Explore parameters such as the number of crossings, the length of the knot, or the number of distinct regions within the design. Investigate how these measures relate to the intricacy and visual richness of the knots

Modelling knots, the triad knot

then analyses of those knots

trigonometric - look at ratios

surface area

or graph it in 3D and work out volumes so you could make jewellery or something!

# data[].attributes.body
Statistics, combinatorics and probability. Nash equilibrium and game theory.

https://monkeysushi.net/gaming/DnD/math.html

Mapping combat balancing factors

hit points, DPR, AC

# data[].attributes.attachment_link.readable_text
Probability theory is a rich branch of mathematics that also intersects with philosophy, theology and logic. Probability theory has its roots in the 1600s, when mathematicians Pascal and Fermat began to analyse the mathematics of games of chance. Pascal and Fermat contributed to not only mathematics, but philosophy and theology. Theologians and philosophy majors may recall Pascal's wager, which in simple terms frames that humans effectively bet with their lives as to whether god exists. We can see therefore, the wide-ranging impact of probability theory.

We can consider that probability theory is a vast area to cover, but one that I believe can be both intuitive and easy to grasp, provided helpful examples are given. Probability theory is also an integral part of data science and understanding the basics in this area will provide a strong foundation for more advanced topics, such as regression and Bayesian analysis.

In recent months, I have spent time reading a variety of texts on probability theory and statistics more generally, including Cooper and Weekes' seminal Data, Models and Statistical Analysis. Given that these texts are often a springboard for experiments and analysis, I felt it might be fun to convey some of the axioms covered by Cooper and Weekes into real-world examples. Given that Stranger Things won't be back for a little while yet, I wanted to take a tour across probability theory, using Dungeons and Dragons as a metaphor for the various axioms discussed.

In this first post, I'll be covering what we mean by independent and dependent events within probability theory, as well as the binomial distribution, which is an essential part of any data scientist's toolkit.

Independent and Dependent Events; Rolling a Twenty-Sided Die

Within probability theory, we have both dependent and independent events. Cooper and Weekes define dependent events as those where the outcome of the first event impacts the outcome of the second. An independent event is therefore one where the outcome of the first event does not impact the second event.

A perfect example of an independent event is two rolls of a dice; indeed this is a classic example from probability theory. In today's post, we'll give it a little D&D twist.
Unlike the dungeon master, or that weird villager who was not at all helpful when your band of adventurers asked about the goblins by the bridge, the dice do not remember!
Let's imagine we've settled down at our weekly game of D&D. Our dungeon master hands out our die and we take a look at the twenty-sided one. We can note that if we roll it twice, the outcome of the first roll will not impact the outcome of the second. Unlike a lot of our choices in D&D, our first roll doesn't impact our next roll.
If A and B are independent, then the p(A and B) = P(A) * P(B)
By understanding the mathematics of probability, we can calculate the chances of two or more independent events and therefore two rolls of twenty in a row. The multiplication theorem for finding this out is as follows:

Let's imagine that we need to use D&D's signature dice to make two rolls of twenty. On its own, the probability of a 20 roll is 1/20. The probability of p(A and B) is therefore:

1/20 * 1/20 = 0.0025
Introducing the Binomial Distribution
As you can see, the probability for this is pretty low! Let's hope we don't need to make two rolls of twenty in our game.

This is all well and good; we now know that our dice rolls don't influence one another. However, we also want to figure out how likely it is we'll achieve x number of rolls of a certain amount ( n) of total rolls within the game. We know that how well we do in the game is defined by the rolls of our dice - and as anyone who has played D&D before, sometimes the difference between a 6 and an 8 can mean everything.

Let's settle back down at the table and catch up with where we are. It's coming to the end of our adventure, and it's not looking good. We're cornered - things aren't looking good for our brave group of adventurers. We have four rolls left to make in the game. And we need to get 20 on three of those!

Framing this within probability theory; we have n trials and we're aiming for x successes, or n = 4, x = 3.

With probability theory, it's possible to understand how likely it will be for our brave adventurers to meet this task, or how cruel our dungeon master is being when it comes to these dice rolls (spoiler; pretty cruel). We can do so using the binomial distribution, which "describes the probability distribution of the random variable number of times x occurs in n experiments" (Cooper & Weekes, 1983).

The equation for the distribution is as follows:
If you're new to statistics the likes of n! can look pretty confusing. n! refers to factorials, which is when you multiply n by a descending series of natural numbers. So if n = 4, then n! is:
A note on factorials (n! and x!)

Back to Binomials

In R, we can use the binomial function to find out how likely it is that 3 of our 4 rolls will be a success, e.g., we'll roll a twenty three times out of four. We know that the probability of rolling a twenty is 1/20. We'll use R's dbinom function, which takes the following values:

##Sample valuesdbinom(3,4,(1/20))
dbinom(x, size, prob, log = FALSE)
= 0.000475

The odds definitely aren't in our favour. This is one cruel dungeon master! For the brave among you, here's a text game built in R that requires you to roll three twenties out of four rolls in order to save the day for your pack of brave adventurers. Be warned; you'll probably die (no dice related pun intended). To play it, simply copy and and paste the code into your R console and type startGame()

Recapping our adventure

So, we've learnt about how probability theory can be used to understand the chances of rolling two twenties with our dice, or more broadly, how the multiplication theorem works for independent events. We've also learnt how the binomial distribution can be used to predict x successes in n trials. We also know our dungeon master is kind of mean, which isn't great news, but we adventure on nonetheless!

It's been fun rolling the dice and all, but in our next game we want to shake things up. Our dungeon master has promised that she'll have some new character sheets ready for our players, but, as she's kind of mean, we don't get to pick our new class, instead we'll be taking one from the table at random. There are 6 sheets, 2 druids, 1 barbarian, 1 paladin, 1 warlock and 1 bard. We'll want to figure out the probabilities of getting each character class.

In the next post, we'll look at dependent events and conditional probabilities to help answer this question. And we'll probably also ask why our dungeon master is so mean.
https://www.varsitytutors.com/hotmath/hotmath_help/topics/binomial-probability http://www.r-tutor.com/elementary-statistics/probability-distributions/binomial-distribution https://stat.ethz.ch/R-manual/R-devel/library/stats/html/Binomial.html
Useful Resources

# data[].attributes.attachment_link.title
Understanding Probability Theory with Dungeons and Dragons

# data[].attributes.attachment_link.description
Probability theory is a rich branch of mathematics that also intersects with philosophy, theology and logic. Probability theory has its roots in the 1600s, when mathematicians Pascal and Fermat began...