In fact, confidence is an excellent gauge of preparation. The student who studies for an important test is confident when he sits down to begin the exam. The public speaker who rehearses her presentation over and over again is confident when she steps up to the microphone. If you lack confidence, then you need more preparation. Put forth the time and effort to adequately prepare yourself, and the confidence will come.
Preparation is hard work.
Yet without it, you'll have to settle for arrogance instead of confidence, and arrogance will eventually fall short. Do your homework. Do the preparation. Be prepared, and be truly confident. That will attract success like a magnet.