Each state has different laws but it is generally the weight of the admixture, regardless of purity, that is the relevant weight of drug possessed.
This can often have quite unfair consequences for MDMA. Given that it almost always comes in tablet form, the weight can get pretty high even though the number of tablets (i.e. hits) is quite modest. This unfairness is compounded given that the dose for MDMA is higher than methylamphetamine, yet most jurisdictions have the relevant threshold quantities for these two drugs as the same.
The purity of MDMA tablets is meaningless, it is of course the dose per tablet that is the relevant quantity. For powdered drugs the higher the purity the more serious it is considered by the courts, not only because it can be cut down but because high purity implies that the person is closer to the source of ultimate manufacture or importation. We know the latter is not always true, particularly given the explosion of crystal methylamphetamine.
Which in most jurisdictions means that you have to prove that you're innocent.
These laws do not mean you must prove that you are innocent, but rather that the drugs were for personal use only (you may have meant that). It must still be proved beyond reasonable doubt that you were in possession of the drug. Possession requires you to have control over the drugs and the knowledge that you are in possession of them. It must be shown that you knew that the substance was a prohibited drug, or at least believed it to be (you need not know exactly what type of drug you have).
Once possession of more than a certain threshold amount is proved, then the person in possession of it must prove that it was only for personal use to avoid an intent to sell/supply or trafficking charge. Different states use different language and labels but I am pretty sure all would have laws of this sort. It makes sense, as proving intent is difficult, so the governments make you prove you did not have the requisite intent.
That is why it is so important, even if you do have more than the threshold amount, that you say nothing about any intention you had to share your drugs with friends or return them to the actual owner etc. Even though you might have considerably more than the threshold amount, you can still satisfy a Magistrate or a jury that any drugs possesed by you were for personal use only - particularly if you are not in possession of any other items indicative of drug dealing (e.g. bags, scales, cutting agent, lots of cash, SMS messages talking about sorting out friends!!) and can afford to purchase that quantity of drugs. Clearly the more you have the harder it becomes to do this.
Moral of the story is do not deal drugs and avoid being in possession of much more than the threshold amount at any one time. If you are, and you are caught, say nothing and you might get off with just possession.