Blockchains are known to be immutable because all transactions of cryptocurrencies and state (data) changes. However, looking at ethscan does not provide any information on the output of a smart contract function that results in a state change. Is there a way to monitor the historic values of a state and if so how to do so?
There are two ways you could potentially track how a state vatiable has changed over time:
1- The contract has been developed so that when said variable is modified its previous state is added to an array which contains all previous states.
2- the contract has been developed so when the state variable is modified it fires an Event that logs said transaction. Here's more info about how to retrieve the logs. How can I view event logs for an ethereum contract?
Both depend on the developer of the contract caring for keeping track of previous values either by storing them or logging it.
There's a third method. You can scan the chain looking for transactions on the contract and querying the state of that variable at each transaction of interest. I'm not saying it's easy--in fact, it's exceptionally difficult given the way the data is stored--but you could do it. I call this idea "off-chain monitoring" of smart contracts.