Let's say I have a canonical partition function for the canonical assemble related to the Helmholtz free energy $A$, given by $$A=-kT\ln Z$$
Now, I want to derive thermodynamical quantities, like the internal energy $E$, pressure $p$ and whichever thermodynamic quantity I want.
How do I go about this?
I know any thermodynamic quantity $X$ can be obtained by $$\langle X \rangle = \sum_{v} P_v X_v$$ where $v$ is an index of a permissible microstate.
For example, how would I get average energy $E$ or average pressure $p$ from such an equation?
So I know, from the above equation, I know $$ Z = \sum_{i} \exp (-\beta E_i - \beta p_i V) \implies P_i \propto \exp (-\beta E_i - \beta p_i V)$$
So, $$\langle E \rangle = \sum _i P_i E_i = \frac{-\frac{dZ}{d\beta}}{Z}$$
I can do the same for pressure, but the differentiation can be done by $\beta V$. How would I find say entropy $S$ for example?