When groups form, the members make perceptions of each others' attitudes. These perceived attitudes describe the person and the members expect the person to act that way consistently. From these descriptions, roles develop within the group. When a group loses someone that performed a certain role, they generally attempt to fill that role with a remaining member.
A major role that develops is the leadership role. For a group to function gracefully, two leaders usually emerge: one in charge of performing the task for which the group exists, and the other to keep the members satisfied. Some people are capable of performing both positions by themselves, but this is not the usual case. Also, good leaders can generally take charge in any type of situation, but their ability may differ according to that situation.
Roles naturally arise from a person's attitude and behavior. However, it seems that a person's attitude and behavior can also be affected by their role. When a person roleplays (assumes a preexisting role which is not necessarily consistent with his or her attitude and behavior), his or her behavior while in that role must change to suit the presumed behavior of the role. As observed during The Stanford Prison Experiment (Zimbardo, http://www.prisonexp.org/) conducted at Stanford University in 1971, a person's attitude also begins to change with his or her behavior. In the experiment, college students were placed in a makeshift prison with other college students acting as guards. Measures were taken to produce as real an environment as possible, including placing chains on the prisoners' feet and placing a stocking on their heads to imitate having their heads shaved. These measures were meant to humiliate them and to make them feel like real prisoners do. The guards were left to make their own rules and many treated the prisoners fairly, while others oppressed them and made them do demeaning things. The conditions were quite bad, and at times, as a form of punishment, the guards did not allow the prisoners to use the washroom facilities, but instead left buckets in the cells. The situation became so bad that some prisoners began to break down. All of them were glad when the experiment ended prematurely. Many reported that they had felt that they were really in a prison, because they were not allowed to leave. Their attitudes changed quite profoundly for the duration of the experiment. The guards' attitudes and behaviors also changed, as some began to take pleasure in the torture. The environment had turned normal people into perpetrators of evil.
The roleplayers' behaviors were dissonant with their attitudes. This meant something had to change in their minds, and so the guards dismissed the dissonance by excusing their actions as only being part of an experiment. Most of the prisoners, however, were being directly harmed, so some changed their behaviors and wanted to leave the experiment. Many of the exprisoners still remember the experiment as a wretched experience.