I sometimes have trouble with the concept of entropy being a driving force for work being done. For example, during osmosis you can raise the level of water on one side of a semipermeable membrane (i.e. do work) because the free energy of the system is minimized if there is a flow of solvent from high to low concentration. Or consider mixing two ideal gases, which results in a negative change in Gibbs Energy. I get that mixing two ideal gases is spontaneous, but I don't get how work is done because gas A and gas B are now together instead of apart. This just doesn't make sense to me. We are talking strictly about entropy and free energy here, so don't take into account intermolecular interactions. If I have a two bags of marbles and then I combine them, I haven't changed the energy of the marbles. I can't do additional work because the marbles are now together. The marbles, or atoms or whatever don't know what is around them. The way I understand entropy is statistical. I realize that it is not statistically likely to throw my two bags of marbles on the ground together and have them stay completely separate in neat little piles. But if for some odd chance they did, I don't see how their free energy would change. Each marble would still have the same energy regardless of whether they mixed or not. I just can't wrap my mind around this statistical expression that is entropy leading to work being done.