December 4, 2019Beta distributions, Dirichlet distributions and Dirichlet processes
Today I am writing about some of my favorite distributions: the beta distribution, the Dirchlet distribution, and the Dirichlet process. All three are handy options to have at your disposal in specifying priors in certain Bayesian models, and they're also rather lovely in their own right.
One thing that makes these distributions really neat is that they can be thought of as distributions of distributions. That is, if we take a draw from one of these distributions, we get a result that itself fully describes a probability distribution. If we take another draw, we get another probability distribution. If we take a lot of draws, we get a whole bunch of distributions, with our beta distribution/Dirichlet distribution/Dirichlet process governing what kinds of distributions we might expect to see more or less commonly represented in the bunch.
My goal today is to give some visual intuition for how these distributions of distributions work. Along the way, we'll also see examples of simple conjugate Bayesian analysis and hyperparameter interpretation for these distributions. We will begin with beta and Dirichlet distributions and build our way up to Dirichlet processes and beyond.
November 18, 2018Learning resources for app development with iOS
Last year I created and taught a class on mobile app development for iOS to high schoolers. The prerequisite was one term of computer science, so all students had done some coding before, although in some cases they were still quite new to coding. It was a joy to teach coding via app development in part because it was such a motivating experience for students as they learned programming to be able to see the results of their creative and problem-solving efforts so quickly and concretely on their own phone.
Here are some resources for getting started creating iOS apps with Xcode and Swift.
- Developing iOS 11 Apps with Swift by Stanford (iTunes U) - So much for saving the best for last. Stanford very generously has made its lectures and notes available for free through iTunes U. This is a GREAT course, and going through it in detail helped my learn what I needed to know in order to teach my own course. It assumes a background in object oriented programming, so might feel a bit fast paced if you are still pretty new to programming. This was not a resource I pointed my students to directly, but one I used for my own learning. Enjoy.
- Coding iPhone Apps for Kids: A Playful Introduction to Swift by Gloria Winquist and Matt McCarthy (No Starch Press, 2017) - Don't let the title throw you off! This is a beautifully produced book with wonderfully clear and helpful exposition. Who - kid or adult - wouldn't appreciate that? The book gives a tour of core ideas of coding in Swift, and then walks through the creation of several apps that would give a nice jumping off point for building your own. It assumes no programming background, but I think it's a great resource even if you've done some coding but are just new to Swift.
- App Development with Swift by Apple Education (iBooks) - This eBook is freely available and assumes no background in coding. It was a useful resource for my students to get a solid grounding in the basics of coding, Swift, and Xcode, and its section on HTTP and URL Sessions was particularly helpful in breaking down a complex topic to make it accessible to my students as they built their own apps. Its interactive quiz questions at the end of each chapter were a good way for students to give themselves a quick check for understanding. The book is meant to lend itself well to an academic course structure, so if you are a teacher new to the subject (like I was!) it could give helpful ideas for structuring a syllabus. I found myself wishing that it got to more exciting example applications more quickly with its labs and guided projects, especially as I was using it for a ten week course, but with a little adaptation it worked out well for us.
- raywenderlich.com - I haven't spent much time on this site yet - and some of the content seems to have been restructured since I have, but I have this on my list of resources to explore more deeply before the next time I teach the course, as it seems to offer a number of helpful and practically-orienteed tutorials on different aspects of iOS development and Swift.
- The Swift Programming Language (Apple) - I found Apple's language guide very clear and helpful for getting to know Swift. It's concise enough that you can reasonably read the whole guide. If you're on the newer side, you'll learn more about programming along the way, and if you've been programming for a long time, I think it will get you pretty quickly into what you need to know about Swift in particular. On its own, it won't teach you how to make apps, but it's a great resource to have on hand.
- Human Interface Guidlines (Apple) - Since I'm coming from a math background, design principles for apps that are enjoyable to use feels pretty out of my field. So, the idea that there are concrete guidelines out there seems magical and reassuring! I can't say I have delved into all of what is here, but each piece I have looked at has given me useful ideas to think about as I look to make and help my students make an app that someone would actually want to use!