Possessive forms are frequently modifiers for verb forms used as nouns, or gerunds. Using the possessive will affect how we read the sentence. For instance, "I'm worried about Joe running in the park after dark" means that I'm worried about Joe and the fact that he runs in the park after dark (the word "running" is a present participle modifying Joe). On the other hand, "I'm worried about Joe's running in the park after dark" puts the emphasis on the running that Joe is doing ("running" is a gerund, and "Joe's" modifies that verbal). Usually, almost always in fact, we use the possessive form of a noun or pronoun to modify a gerund.
Do we say "I can't stand him singing in the shower," or do we say "I can't stand his singing in the shower"? Well, you have to decide what you find objectionable: is it him, the fact that he is singing in the shower, or is it the singing that is being done by him that you can't stand? Chances are, it's the latter, it's the singing that belongs to him that bugs you. So we would say, "I can't stand his singing in the shower."
On the other hand, do we say "I noticed your standing in the alley last night"? Probably not, because it's not the action that we noticed; it's the person. So we'd say and write, instead, "I noticed you standing in the alley last night." Usually, however, when a noun or pronoun precedes a gerund, that noun or pronoun takes a possessive form. This is especially true of formal, academic writing.
There are exceptions to this. (What would the study of language be without exceptions?)
When the noun preceding the gerund is modified by other words, use the common form of that noun, not the possessive.
Federico was pleased by Carlos's making the Dean's List for the first time.
Federico was pleased by Carlos, his oldest son, making the Dean's List for the first time.
When the noun preceding the gerund is plural, collective, or abstract, use the common form of that noun, not the possessive.
Professor Villa was amazed by her students working as hard as they did.
The class working collaboratively was somebody else's idea.
It was a case of old age getting the better of them.
There are certain situations in which the possessive and the gerund create an awkward combination. This seems to be particularly true when indefinite pronouns are involved.
I was shocked by somebody's making that remark.
This would be greatly improved by saying, instead . . .
I was shocked that somebody would make that remark.
This is also true when the "owner" of the gerund comes wrapped in a noun phrase:
I was thankful for the guy next door shoveling snow from my driveway.