Derivation Of Q Factor