# LaTeX in Anki

So I have LaTeX working in Anki:

Front of Card:

Let X be the number of tosses requires until the first 5 appears on a die.
$\displaystyle E(\frac{1}{2^X})?$
Back of Card:
$\displaystyle \frac{1}{7} =\frac{1}{6(2)-5}$
Geometric distribution
$\displaystyle \sum_{i=1}^{\infty} \left(\frac{1}{n}\right)^i\left(\frac{1}{6}\right)\left(\frac{5}{6}\right)^{i-1} =\left(\frac{1}{6}\right)\left(\frac{1}{n}\right)\sum_{i=0}^{\infty}\left(\frac{5}{6n}\right)^i$
$\displaystyle=\left(\frac{1}{6n-1}\right)$

I know that is a little wordy for a flash card, but sometimes I like to put a little background information on the back of a card, so I can remember how the fact is derived.  And, yes, I know that I have been carrying on about SuperMemo.  Too bad ðŸ™‚

# When Things Get Tough

I’ve been through this before.Â  Times when I look at the page, and things that I thought I learned earlier don’t make any sense now.Â  Times when every little distraction puts takes my mind away from where I want it to be.Â  Times when I question whether I will ever learn this stuff.

What is a person to do in these circumstances?Â  Here is my list, which I will add to:

• Back up.Â  Work on easier, more foundational skills.
• Start and complete a creative project involving the current material.Â  For math this might be something like a cheat sheet, or some simple sample problems.
• Find other sources of information.Â  Collect all of the books available that touch on the given topic, and perhaps one of them will resonate.
• Drop the current topic, and come back to it later.
• Get organized.Â  Attack the subject in the very most thorough and efficient possible manner.

Already, writing my list has helped me.Â  I have way too many piles on my desk right now.Â  I am putting away everything on my desk that is tangential to this topic, and laying out all of my good sources.Â  Then, I will make a document here that summarizes my work.Â  Here goes. ðŸ™‚

{one hour passes}

It is an hour later, and I have already feel better about my progress.Â  I started off by putting some General Tso’s Chicken in the microwave.Â  Then, I came back and cleared my desk off.Â  I still had a pile from where I wrote bills out this morning.Â  Just clearing that off made me feel a whole lot better.

After eating, I dug through books to find some good material on transformations of random variables.Â  In one old Dover book I found half of what I needed: some simplified explanations that I had never seen before.Â  In another book, I found the rest of what I needed, a rigorous theorem-proof coverage of the “rules” glossed over in other texts.

So, I am going to spend a few hours with my friends Casella and Berger (Statistical Inference, 1990, Wadsworth).Â Â  Later, I will share my results.

# My current Probability items for Anki

I thought that I would post my current memorization list for exam P/1 in both Mnemosyne and Anki form, but I am having trouble with the xml files that Mnemosyne is creating.Â  So what I have here is just in Anki form. Â  I don’t believe that there are any mathematical errors, however there may be some small formatting errors in the Anki file due to the conversion.Â  There are currently 489 items in the deck.

Anki Deck for Exam P/1

It would be great if you could let me know what you think.Â  I will repost perfected versions of these every couple of months.

By the way, I just realized that there are 6 cards in the deck with images that did not get transferred.Â  A few cosine questions, and a couple with even and odd functions.Â  Just ignore them for now.

# Am I graduating to SuperMemo?

So, I am finally biting the bullet and using SuperMemo.Â  I really like being able to chart my progress.Â  And it appears that I can just copy formulas written in LaTeX and paste them right into the program.Â  I think somehow that SuperMemo uses internet explorer for this.

But it is the extra creative possibilities that sold me on SuperMemo, in the end.Â  What finally convinced me was the collection posted on this blog:Â  SuperMemo Adventures.Â  There is a deck for download that uses a few of the great visual formatting possibilities that are not possible with the other software out there.Â  I am gradually going to transfer my material over.

Upon reflection, I suppose the thing that always draws me back to SuperMemo is all the stuff about spaced repetition on the SuperMemo website.Â  This information was my introduction to spaced repetition several years ago.Â  When I read it, I get the feeling that it was written by someone who really believes in what they are writing.Â  This aspect brings me back time and time again.

# Adding Some Mathematical Content to My Pile.

So, I was up early doing some random problems, and I ran onto this one:

Given f(x) = 1/9 (3âˆ’ |x| ) for |x| < 3, what is Var(X)?

I have seen this problem before.Â  There are a few easy to avoid pitfalls.

We need to find Var(X) = E(X2) – E(X)2.

First, we notice that this is an even function.Â  The expected value of an even function is 0.Â  Since f(x) is even, xf(x) is odd.Â  The integral of an odd function from -L to L is 0.Â  This is a very simple fact which, if missed, will lead you into a mess of integration.

Next, we notice that E(X2) is an even function, because x2f(x) will still be even.Â  The integral from -L to L of an even function is simply 2 times the integral from 0 to L of the function.Â  This integral is super easy to calculate.
$\displaystyle Var(X) = \frac {2}{9} \int_0^3 x^2(3-x)dx = \frac{3}{2}$
Next, since this problem involves some traps, and some non-trivial calculus facts, I decide to explore the problem further and to enter the facts into my spaced repetition software.Â  First, I start with some general questions:

The expected value of an even function is ???

• 0
• Since f(x) is even, xf(x) is odd. The integral of an odd function from -A to A is 0.

When f(x) is even, E(X) is ???

• 0
• Since f(x) is even, xf(x) is odd. The integral of an odd function from -L to L is 0.

When f(x) is even, E(X2) is 2 times ???

• âˆ« from 0 to L x2f(x) dx
• because when f(x) is even x2f(x) is also even

The variance of an even function is E(???)

• E(X2)
• because xf(x) is an odd function, hence E(X) = 0
• E(X2) – 02 = E(X2)

Given f(x) = 1/L2(Lâˆ’ |x| ) for |x| < L, what is E(X)?

• 0
• Since f(x) is even, xf(x) is odd. The integral of an odd function from -L to L is 0.

Now, since my goal is to become a whiz, you will see above that I have started to find a general solution to a specific problem.Â  Mathematics is all about that.Â  So, my next batch of problems are both more general, and more specific.

Given f(x) = 1/L2(Lâˆ’ |x| ) for |x| < L, what is E(X2)?

• L2/ 6
• This is also Var(X), because the variance of an even function is E(X2)

Given f(x) = 1/L2(Lâˆ’ |x| ) for |x| < L, what is Var(X)?

• L2/ 6
• This is also E(X2), because the variance of an even function is E(X2)

Given f(x) = 1/4(2âˆ’ |x| ) for |x| < 2, what is Var(X)?

• 2/3
• Variance of f(x) = 1/L2(Lâˆ’ |x| ) for |x| < L = L2/ 6

Given f(x) = 1/9 (3âˆ’ |x| ) for |x| < 3, what is Var(X)?

• 3/2
• Variance of f(x) = 1/L2(Lâˆ’ |x| ) for |x| < L = L2/ 6

Given f(x) = 1/16 (4âˆ’ |x| ) for |x| < 4, what is Var(X)?

• 8/3
• Variance of f(x) = 1/L2(Lâˆ’ |x| ) for |x| < L = L2/ 6

I often like to throw in a few numeric examples, so that I learn to recognize my generalization when I run into it.Â  So, I have taken a problem and turned it into a dozen memorization items.

# Really Struggling (In a Good Way)

I am really struggling in a good way right now.Â  I am taking a week or so to work a few hours a day on joint conditional probability problems.Â  These can be real stumpers.Â  First, the areas and limits of integration involve some work.Â  Diagrams are a must.Â  Then, it takes several layers of reasoning get from what is given to the desired outcome.Â  On average, I take in between a half hour and an hour with each problem.Â  Then, the problem goes on my “solved easy list” or “solved tough” list.Â  Each day, I try to work with new problems, plus solved ones.

At this point, I am just working with problems from the SOA/CAS samples.Â  These are problems 109 through 125, 131, 136, 138, 144, 145.Â  This is not an exhaustive list, and may include some unrelated problems.Â  Still, my reasoning at this point is that these problems are the best place to start.

For instance, I can’t believe that this one still tricks me: We are given that f(x, y) = 2e-(x+2y), for x>0, y>0, and asked to find the variance of Y given that X>3, Y>3.Â  After forty minutes, I look at the answer key, and find that X and Y are independent.Â  Hopefully I have learned my lesson, and that is the last time that fools me.

So, I am up to page 262 in Guo.Â  I have to slow down a little now, and spend a week or so working joint marginal and conditional density problems.Â  First, these problems are difficult to set up correctly.Â  Then, they usually involve a big, icky integration.Â  So, I am going to spend at least another week working specifically on this type of problem.

At one time, I had printed out all of the old SOA/CAS exams and put them in big binders.Â  Nice, but hard to lug around when I wanted to get out of the house and study.Â  Recently, I noticed that there is a pdf file available with 153 questions and solutions.Â  This is updated from another smaller file of questions and solutions.Â  Here are the links:
questions
solutions

I have realized that virtually everything from the old sample exams has been extracted and put into these documents.Â  So, I printed out a couple of nice little booklets that I can take anywhere with me:

Nice Little Problems

I would also like to index the problems.Â  If I do, I will post the index here.

And , oh, the big news is that I acquired my first pair of reading glasses yesterday.Â  This is a bigger milestone than it might seem.Â  In the last year, I have realized that I have a little trouble seeing when I lay down to read a few pages before I go to sleep each night.Â  Almost every night of my life, I have read a few pages.Â  But here is how it was going recently.Â  I would lay lie down and open a book.Â  In a minute or so I would get frustrated that I couldn’t see, and turn the light out.Â  Then, I would think, “Gee, I would get to sleep a lot easier if I could read a few pages of Dedekind, or Hilbert.”Â  (these are books that always make me happy) So, I would turn the light on, start reading, and suddenly realize that I CAN’T SEE.Â  So, I would turn the light off again, and start thinking about reading.

Now, I have reading glasses.Â  They were a dollar, at the dollar store.Â  I am very happy.

# A Few Productive Days

I have had a few productive days, both in my studies, and in my life in general.

I am up to page 250 in Guo.Â  I read through the sections on the Beta, Weibull, Pareto, Lognormal, and Chi-square distributions, and did some problems, but did not put any particular effort into them.Â  When I am finished with the rest of the book, I will return and make a more thorough study.

What I did put effort into is the section on joint density and double integrations.Â  I have been doing these kinds of problems for a long time, and have been thrown off by more than a few of them, but have never really put any thought into a standard technique for solving them.

I could have just cracked a calculus book to find the same information.Â  First, I check my copy of Apostal (1961), but I only have volume I.Â  So then, I check Stewart (1999) and Larson (1990), which do have equivalent information.Â  Even easier, I could have spent a little more time with The Actex P/1 Study Manual (Boverman, 2010) which does have very specific ideas for settings up double integrations.

The important thing is to draw good diagrams.Â  It is easy to become complacent with the idea of solving mathematics problems completely symbolically.Â  A graph may not prove anything, but it can sure get you on the right track.

So, I am up to 466 memorization items.Â  One thing that I am memorizing is some nameless distributions that appear in old tests. One example is the distribution:

f(x) = 2x / L2, 0 < x < L

I have noticed that this distribution appears on many old problems.Â  If you check, it integrates to 1, so it is a pdf.Â  Well, it is easy to find formulas for E(X) and Var(X), and memorize them you would for any other named distribution.Â  Then, one does not need to perform time-consuming integrations at test time.

# Gamma Distributions

 Gamma Function: $\displaystyle \Gamma (\alpha)= \int_0^\infty e^{-y}y^{\alpha-1}dy$ Gamma Distribution: $\displaystyle \frac{\beta^{\alpha}x^{\alpha-1}e^{-\beta x}}{\Gamma(\alpha)}$ Gamma Distribution: $\displaystyle \frac{\beta^n x^{n-1}e^{-\beta x}}{(n-1)!}$ $\displaystyle \Gamma (n) = (n-1)!$ $\displaystyle \frac{x^{\alpha-1}e^{-\beta x}}{\theta^{\alpha}\Gamma(\alpha)}$ $\displaystyle \frac{x^{n-1}e^{-\beta x}}{\theta^n (n-1)!}$ $\displaystyle \Gamma (n+\frac{1}{2})\\ = 1\times3\times5\times, ..., (2n-1)\frac{\sqrt(\pi)}{2^n}$ $\displaystyle \beta e^{-\beta x} \frac{(\beta x)^{\alpha-1}}{\Gamma(\alpha)}$ $\displaystyle \beta e^{-\beta x} \frac{(\beta x)^{n-1}}{(n-1)!}$

### Status

Okay, so I’m finally up to page 183 in Guo.Â  He has a few chapters on some distributions that no longer appear on the test p syllabus.Â  I am going ahead and working through them anyways, partly because it will give me some entirely new material for a change.Â  In the meanwhile I am returning to doing an hour or two each day of random problems from old SOA tests, plus continuing with memorization.Â  Whenever I run into calculus I have forgotten, I take a little time to crack open a couple of calculus books to review the topic.Â  If I find good stuff that I want to remember, I load it into my spaced repetition software.

In the meanwhile, I have been experimenting on formating things in this post using LaTeX. I have never used LaTeX much, but the basic syntax seems pretty simple.Â  When I was writing math papers, I found that open office gave me a similar functionality.Â  In other words, one may just type in “integral from 0 to infinity e^(-y)y^(a-1)dy and it would end up looking like:
$\int_0^\infty e^{-y}y^{\alpha-1}dy$

Wow, I did it!Â  My very first LaTeX equation!Â  (It doesn’t take too much to make me very happy).Â  In case you are wondering, that is the Gamma Function, $\Gamma(\alpha)$.

What I actually typed in was \int_0^\infty e^{-y}y^{\alpha-1}dy, and the LaTeX machine did lots of intelligent stuff to make it look right.