^Has exactly nothing to do with it. The number and type of cards we get is obviously determined before packing.
However, back on topic, whether there will be a LV. X in the pack or not, there is a certain chance involved. A machine, some kind of simple computer I suppose, will throw this chance (which seems to be about 1/72 in the current sets? Maybe a bit higher) into a formula, the algorithm, to see which packs actually get the LV. X and which don't. The formula, of course, is not random at all, in fact I think it's fixed (since a randomizer randomizing the formula would be strange, since this would eventually lead to an infinite loop where you still don't have 100% randomness. Also, doing this is a bit paranoid, since the issue isn't really life-threatening or something, and a slightly higher number of Lv. X won't affect anyone).