Here’s some more notes for you, again in PDF format. is actually getting kind of fun, now that I’m figuring it out. I’ve even figured out how to draw simple diagrams and the like from within
, so I don’t have to keep switching back and forth between programs, which is kind of nice. Anyway, here you go.
Category Archives: school
S520, January 22
Here’s another edition of my notes from my S520 class. (Sorry, I’m a little behind.) This time, I wrote all the notes in , both for the challenge and for the practice. Therefore, today’s entry is a PDF file, not a real blog post. (Sorry.) Here are the notes. Let me know if you find any major errors.
By the way, I am still working on the RAMMCAP post I promised last time–it’s just turning out to be a lot longer than I’d originally intended. I’ll probably break it up into multiple posts next week.
S520, January 20
Brief introduction into the class: S520 is an introductory course in statistics for graduate students taught by Professor Michael Trosset. It aims for depth in each of the subjects we talk about, explaining the why’s and wherefore’s of each topic instead of trying to cram as many topics in as possible (which is a major perk, in my opinion). It’s actually taught in conjunction with S320, the undergraduate version of the same course, so I think most of the other students in the course are undergrads (not a bad thing, just an observation). You can read more about it on the pages linked above. Ok, on with the notes.
Chapter 3, Probability
Section 3.2
- Basics of modern probability devised by Kolmogorov as discussed last time.
- Kolmogorov’s probability space has three major components
, the sample space – the universe of possible experimental outcomes
, the collection of subsets of
called “events”- events have well-defined probabilities
, the probability measure-a function that assigns real numbers (called “probabilities”) to events-in proper notation, that looks like:
- There are several criteria the probability measure has to satisfy, though many of the are by convention only.
- Convention – we require
, where
is the probability of any given event.
- If
not going to happen, generally speaking. (Apparently there are exceptions I don’t know about.)
- If
definitely going to happen.
- If
- Convention –
has to be an event in
- Crucial property: If
and
are disjoint
events, then the probablility of their union is:
- Example: Drawing a card
- Example: Drawing a card
- Convention – we require
- Because of those conventions, we can learn these things:
- There are several criteria the probability measure has to satisfy, though many of the are by convention only.
Section 3.3 Finite Sample Space
has a finite number
of outcomes, represented by
- For example:
- So,
- If we know the probability of the individual outcomes, we can compute the probability of any event by adding the probabilities of the relevant outcomes.
- Core assumption: individual events in the collection are separate by convention.
- Important special case (limit of most high school probability): Suppose that each of the
outcomes is “equally likely” (recurring phrase we’ll hear a lot). In this case, each outcome has probability:
This means that with equally likely outcomes, figuring probabilities is basically just counting.
- Example:
for
outcomes in
, then
- 3 of a kind example: Draw 5 cards from a standard deck of cards. What is
?
A:
- Counting example (Exercise 3.7.2 in book): Assume the probabilities of throwing an astragalus are:
- So we have:
- So we have:
- Example:
Friday – Conditional probabilities
College geekery
So, I haven’t updated this blog in a while–sorry about that. School’s been keeping me really busy the past couple of weeks, but I realized that I needed to rectify this problem with something, at least, so I just wanted to mention a couple things I’ve been doing lately.
- First off, I’ve been delving deeper into Python lately. We’re using it for one of my classes, and I’ve gotten to know (and like) it much better than I did before. Most of my stuff is fairly uninteresting stuff, but here’s a list, anyway. (Code available on request, though I might post it later.) I’ve got a couple more things under development, but I’ll add them when they’re finished.
- A short file full of biological constants that I’m extending as I find new things to add to it.
- A sequence simulator that generates random DNA sequences based on a given base proportions.
- A bio-translator that takes in a file with a list of DNA bases and calculates the amino acids that map to each codon, even when you take frameshifting into account.
- A CoinChanger, which takes in a domain of coins (say the US coin system of pennies, nickels, dimes, quarters, half-dollars, and dollars) and returns the minimum number of coins you need to make change from that. Since some domains of coins break the standard greedy algorithm for making change, this CoinChanger also implements a recursive algorithm and a bottom-up algorithm for making change.
- A Sequencer which reads in a FASTA formatted file and outputs various statistics about it.
- A file which uses the Sequencer code to answer some questions.
- A timer file which takes in a list of execution times and a list of run time functions, then computes the largest n that can be computed in those given execution times, where n is the size of the input element. (My favorite result: If you have a run time function that grows factorially, you could only have an input of 17 elements before your algorithm takes more than a century of microseconds to compute. That’s bad.)
- I’ve been learning Matlab, which is another programming language with syntax similar to Pascal and Ada. It’s got a lot of cool features, like built-in matrix operations, and some pretty annoying stuff (like how basically everything is a matrix, which is almost as bad as Java’s treating everything like an object). It’s growing on me, but slowly–I still think it should work very differently than it does. The things I’ve written in Matlab include:
- An implementation of Insertion Sort.
- An implementation of Merge Sort.
- A program that uses and compares the two of them, then creates a couple charts based on that data.
- An implementation of a Stack. (Though it’s a global stack because of the requirements of the assignment. It should be local as far as I’m concerned.)
- A partial implementation of a singly Linked List. (Though again it’s a global list, which is annoying.) Search seems to work, insert works (mostly), but my delete function has issues, part of which stem from a bug in my insert function that I haven’t had time to track down.
- I’ve also worked with a program called Alice in my AI work. Alice is a 3D graphics program used to help teach programming. It has most of the basic programming constructs (loops, conditionals, functions, methods), but it does some weird stuff, and I’m still a little skeptical it will help people really understand those programming constructs. We’ll see next week when we drop to a real programming language (Python, ironically).
- I’ve used Audacity to put up a teeny-tiny podcast, but I’m probably not going to keep that one going–too much work, and not really any benefit for me right now. Maybe someday, but not today.
I think that’s all the major stuff I’ve done over the past couple of weeks. I’ll try to let you know if anything changes.