How is the price and movement of a Stock Futures similar to its underlying stock even though they are two different segments.?

They are linked to each other on expiry day. Both Futures and stock price match on Expiry day. Based on this prices of futures are moved. Futures prices = Stock prices + interest - dividend.