It's not dissimilar to the formula we were given on the teacher training course, which IIRC was:
success = talent x motivation
To modify that for writing success as opposed to success in mastering a new subject, I think I would add the luck component thus:
success = talent x motivation + luck
(NB: I'm assuming here that motivation is approximately equivalent to "dedication + passion".)
But I think it's vital that it's a multiplication sign in there not an addition sign. I don't care how much innate talent you have, if you have zero motivation, you won't succeed -- at writing or anything else. Likewise if you have zero talent, no amount of motivation will make you a writer. However... As long as innate talent > 0 you can make up for that lack with a correspondingly large value for motivation.
sleigh has supplied values to make his formula work, but I still prefer my tutor's version, because really its only purpose is to make a point about talent versus motivation. Any actual numerical value assigned to the variables are purely hypothetical estimates.
Also, I feel that luck varies more wildly than sleight shows. Even people with zero writing talent have had books published due to a whopping stroke of luck, such as being a top model, pop singer, the girlfriend of a premier league footballer or similar. And then there are the people who could have made it as writer but were struck down by illness, the number 7 bus, etcetera etcetera.