I’m looking to learn how to do probabilistic simulations: both the math and the programming.
Is there a good online course or tutorial for this in Julia (if not, just a good one for the math)?

Background: I have a rudimentary grasp of grad-level probability and have seen some very basic stuff about like Monte carlo simulation, Gibb’s sampling, rejection and importance sampling, but would be good to review and deepen my understanding of these concepts. I have never coded any of these things.

Model building… ie. how to use/apply statistical/probabilistic programming

Probability Math: the language you’re speaking when you do 1.

Probabilistics Programming / Sampling: How to express 2 to a computer.

Which layer do you want to focus on first?

I guess 3 mainly.

I would also be interested to use sampling to solve optimization problems involving expectations, but I guess I should probably start with just how to do sampling.

Ok, there are two main pieces of software I would recommend you to learn. Turing.jl and Stan. Since you’re already a Julia user, I’d recommend you read up on the Turing docs

However, I’d also recommend you read the Stan user manual, it is basically a tremendous resource of ideas of how to do probabilistic programming.