An instruction sequence of length n
The probability that execution of a branch instruction q
The instruction without branch (n-q)
p be the probability of conditional and unconditional branch instruction
$I_x$ causes a jump to a nonconsecutive address
means $I_x$ is conditional branch instruction.
Unconditional branch instruction (p-$I_x$)
So, execution time of pipeline processor =$(n-q)\times t _{p}+q((p-I_{x})\times kt_{p}+I_{x}\times t _{p})$
Speedup=$\frac{t_{np}}{(n-q)\times t _{p}+q((p-I_{x})\times kt_{p}+I_{x}\times t _{p})}$
Reference:https://gateoverflow.in/683/gate2000-12