Hobs = 2pq(1 - F) where F is the fractional deficiency of heterozygotes due to inbreeding
Rearrange to extract F:
(2pq)(1 - F) = Hobs
2pq - (2pq)(F) = Hobs
- (2pq)(F) = Hobs - 2pq
F = (Hobs - 2pq)/(- 2pq)
F = (2pq - Hobs) / (2pq)
and because Hexp = 2pq is the expected frequency of heterozygotes based on observed p & q
F = (Hexp - Hobs) / Hexp