Standard deviation of two dependant dice rolls
I have two dice, a d4 and a d6.
I first roll the d4. If I roll more than 2, I roll the d6 and note the result as my score. If I roll 2 or less, my score is 0.
I know that I can manually calculate the standard deviation by just writing out the score for all 24 possible results (12 * 0, 2 * [1..6]) and putting that into the standard deviation formula. That comes out to 2.126.
What I'm actually trying to do however is find a generalised formula that calculates the standard deviation of the score when rolling 1dx if 1dy is greater than z.
Going back to my d4 and d6, I know that the standard deviation of a d6 is 1.708, and I have a 50% chance that I roll the d6, or a 50% chance that I score 0. Is there a formula that I can use to get from those values to the 2.126?
To make it even more complicated, the next step is that if I roll a 4 on the d4, I actually roll 2d6. 50% chance to score 0, 25% chance to score 1d6, 25% chance to score 2d6. That gives me a standard deviation of 3.257. Is there a formula I could use to calculate this as well?