A common misconception is that taking niacin will help you pass a drug test. This is nothing more than a myth. Niacin has absolutely no effect on the THC metabolites in your urine. But let's assume that you only took niacin and drank water, and that you did pass your test. It would be a fallacy of causation to think that it was because of the niacin. Nothing more than pure coincidence.
I view niacin like I do prayer, and I don't mean to offend anyone who believes in the power of prayer. Let's say that you pray everyday. Maybe you pray for good health, or that your mother who is sick in the hospital will get better, or that you'll get a raise soon. You make hundreds, no, thousands of prayers. Eventually, one of those prayers is bound to be "answered." You can say that prayer works, or that statistically, it was just bound to happen by pure chance. But what about all the other times your prayers weren't answered?
Another way to look at it would be like so. Let's say you're thinking about a friend, and they just happen to call. You find it amazing that just as you were thinking about them, they called. But what about all the times they didn't call?
The point is, you can pass a test and take niacin, but it was probably something else that caused the negative, not niacin.