I respectfully disagree that the prior crimes evidence was improperly admitted and that such admission was prejudicial.
When we review a trial court’s ruling concerning admission of evidence, we consider only the evidence before the court when it made its ruling. (People v. Hartsch (2010) 49 Cal.4th 472, 491 [110 Cal.Rptr.3d 673, 232 P.3d 663].) Here, the trial court ruled on the pretrial motion relying on the prosecution’s offer of proof. Since those were the facts before the trial court when it made its ruling, any other facts developed at trial were and are immaterial to the trial court’s ruling.
As noted by the majority, the offer of proof concerning the two prior crimes was as follows:
“On May 25, 2005, security guards witnessed domestic violence occurring between Corvette Hendrix, the Defendant’s sister, and her boyfriend. The Defendant then got involved. SPD Officer Mueller attempted to detain him, but he violently resisted. When he was being transported to jail, he repeatedly threatened the [szc] SPD Officer Wycinski who was driving. He asserted that he would look up the officer’s address on the [Ijntemet, and come ‘get him.’ At the station, he yelled, ‘You better change your beat.’ ”
“On September 18, 1993, Alameda Police Officer Simmons responded to reports of an intoxicated person causing a disturbance. He contacted the Defendant, who was displaying objective signs of intoxication. The Defendant passively resisted as Officer Simmons placed handcuffs on him. The Defendant tried to wriggle out of the officer’s hold as they walked to the police car. He then refused to get into the vehicle. He kicked at another officer who was trying to assist. Once placed in the car, he lied [szc] on his back and moved his hands to the front of his body. He kicked the patrol [car] *254door. Officer Simmons removed the Defendant from the patrol car, and the Defendant started to struggle again. The deputies placed him back in the patrol car, this time with a hobble, but the Defendant ripped it from his feet. When Officer Simmons tried to replace it, the Defendant spit in his face. The Defendant was finally transported to a holding cell. He hit, kicked and tried to ram the door with his body. He also tried to cover the camera in the cell.”
These past circumstances gave defendant experience, closeup and personal, with police officers. He was able to observe them, and he learned that they would use physical force on his body to detain him. In one instance, there was also a security guard present before the police officers arrived, and defendant learned that, when situations escalate with a security guard present, police officers tend to arrive and take control. Defendant’s experience surpassed that of most people who have no close contact with security guards and police officers. Since these past experiences resulted in opportunities for defendant to know how to distinguish between security guards and police officers, they were highly relevant to the main point of contention at trial—that is, whether defendant knew that he was resisting a police officer.
In my opinion, this was sufficient to sustain the trial court’s exercise of discretion. This probative value of the evidence outweighed any prejudicial effect from the jury’s knowing that defendant resisted police officers in the past. The jury was properly instructed that it could not consider the past conduct except as it related to the knowledge issue. However, the majority attempts to create a new requirement that, when the past crimes are relevant to knowledge, the past and current crimes must be similar. This attempt ignores reality because knowledge may be inferred from many circumstances of past conduct that are dissimilar on their facts to the current crime.
For example, a person might shoplift at a store and be detained by security guards at the store who identify themselves as security guards. The store might then call the police, and the responding officers might introduce themselves as police officers. Such a scenario would give that person experience in telling who are and who are not police officers. Compare this hypothetical prior crime to defendant’s current crime. Shoplifting is nothing like resisting a police officer, yet the knowledge the person gained from the prior shoplifting is highly probative of whether the person actually was able to distinguish between security guards and police officers. Similarity can contribute to the probative value of the prior conduct, but it certainly is not the only, or even the most, probative factor. Despite this, the majority would exclude dissimilar prior crimes even if they provided strong evidence that defendant knew he was resisting police officers.
The majority found no cases requiring that prior conduct used to establish knowledge be similar to the present crime. (Maj. opn., ante, at p. 241.) That *255is because there is no such requirement. The majority even cited a case making this point: “ ‘[W]hen offered to prove knowledge, ... the prior act need not be similar to the charged act as long as the prior act was one which would tend to make the existence of the defendant’s knowledge more probable than it would be without the evidence.’ [Citation.]” (U.S. v. Vo (9th Cir. 2005) 413 F.3d 1010, 1018.) Here, defendant’s prior acts made it more probable that he actually distinguished between a security guard and a police officer on the night of his crime. Therefore, the trial court did not abuse its discretion in admitting the evidence.1
In any event, any error in admitting the evidence of defendant’s prior crimes was harmless. It is not reasonably probable that defendant would have obtained a more favorable result absent the asserted error. (See People v. Foster (2010) 50 Cal.4th 1301, 1333-1334 [117 Cal.Rptr.3d 658, 242 P.3d 105].)
Defendant had a history with Justin McCall, the security guard. Six or eight times, McCall had confronted defendant and told him to leave the apartment complex’s parking lot. On the evening of the crime, McCall, in his black security guard uniform, confronted defendant and defendant told McCall that McCall was “doing too much,” implying that defendant was fed up with McCall’s continuing insistence that defendant not loiter in the parking lot. And defendant was immediately hostile towards McCall. Therefore, defendant knew McCall only too well.
In the initial altercation on the evening of the crime, McCall sprayed pepper spray in defendant’s face after defendant “shoulder-bump[ed]” McCall’s chest. Defendant walked away, grabbing his eyes, so McCall’s aim appears to have been true.
Within a minute or two after McCall pepper sprayed defendant, they met again at the complex’s swimming pool. Defendant saw McCall from about 30 yards away and charged him. In McCall’s words, defendant “turned, saw me, and then he just made a straight bee line for me.” This was not a man who was debilitated or blinded by the pepper spray. He saw McCall and attacked him. McCall attempted to pepper spray defendant again, this time from five or six feet away. However, McCall was not sure whether he got defendant in the eyes; defendant did not rub his eyes like he had done before. In any event, defendant was not debilitated by this second pepper spraying because he continued to attack McCall until McCall, fearing for his life, pulled out his gun and shot in defendant’s direction.
*256Defendant ran off. So, at this point, defendant was not debilitated and had been able to see and identify McCall, both before and after he was pepper sprayed the first time. And there is no evidence that defendant encountered any security officer that evening other than McCall, whom he recognized even after being pepper sprayed.
After McCall’s encounters with defendant, on the same night, police officers, including Officers Luke Mosley, Lisa Khang, and Gerald Landberg, all in their navy blue Sacramento Police Department uniforms, arrived at the apartment complex.
McCall pointed out defendant, and the police officers went to confront defendant, telling McCall to stay behind. Even though it was nighttime, the area was well lit both from lights on the buildings and lights in the parking lot. The three police officers took positions outside the dumpster enclosure, where they had seen defendant. Defendant came out of the dumpster area, agitated. He was flailing his arms and yelling incoherently. During this time, he looked at the officers who were 15 to 20 feet away, but he also looked away. At one point, he assumed a fighting stance and stared at the officers. He was not rubbing his eyes and did not appear to have a problem seeing.
So, at this point, the area was well lit; neither McCall nor any other security guard was in the immediate area; the officers were dressed differently from McCall, wearing navy blue uniforms and not black uniforms; and defendant, who did not appear to have a problem seeing, looked at them and, by inference, would have seen that McCall was not with them.
The officers commanded defendant to get on the ground. Instead, he directed an expletive at them and ran away.
The majority concludes that the error it perceives in admission of evidence was not harmless because the evidence was not overwhelming. In arriving at this conclusion, the majority concentrates exclusively on facts it believes call into question the verdict. I recount and comment on each of the facts cited by the majority.
It was night. (Maj. opn., ante, at p. 251.) But the area was well lit.
The uniforms of the security guards were black, and the police officers’ uniforms were navy blue. (Maj. opn., ante, at p. 251.) Again, the area was well lit, and defendant looked at the police officers and could see that McCall was not there.
Defendant was intoxicated, agitated, and incoherent. (Maj. opn., ante, at pp. 229, 252.) He was intoxicated and agitated. And he yelled incoherently. *257But he obviously was not so incoherent that he could not attack McCall twice, take a fighting stance against the officers, address an expletive at the officers, and try to escape.
Defendant had been sprayed twice with pepper spray. (Maj. opn., ante, at p. 251.) But he recovered quickly after the first pepper spraying and may not have been affected at all by the second, attempted pepper spraying. In any event, by the time the police officers confronted him, he appeared to be suffering no ill effects of the pepper spray.
The police officers did not identify themselves and did not use their sirens or flashing lights, and defendant did not see the police department patrol cars. (Maj. opn., ante, at pp. 251-252.) This is true, but defendant saw the officers in a well-lit area.
The evidence concerning defendant’s opportunity to see the police officers outside the dumpster area was inconsistent. (Maj. opn., ante, at p. 252.) It is true that the testimony of the police officers was not perfectly consistent, but there can be no doubt that (1) the area was well lit, (2) defendant saw the police officers and knew that McCall was not one of the officers then confronting him, and (3) the officers were wearing navy blue police department uniforms and not black security guard uniforms.
The evidence concerning the police officers’ chasing of defendant was inconsistent. (Maj. opn., ante, at p. 252.) In my opinion, how the chase went down really has little to do with whether defendant knew the three were police officers. He saw them, fled, and was wrestled down and handcuffed.
The majority concludes that it is reasonably probable that defendant would have obtained a more favorable result absent the assertedly inadmissible evidence because “the irrelevant and nonprobative other crimes evidence the jury heard was [inherently and] undoubtedly prejudicial . . . .” (Maj. opn., ante, at p. 252.) As one might surmise from my comments about the evidence, I disagree that the evidence was inadmissible or that, even if it should not have been admitted, it was prejudicial. The jury was properly instructed concerning how to use the evidence of past conduct, and there was ample evidence that defendant knew that the three police officers whom he saw in a well-lit area were police officers.
In any event, the majority’s approach to the harmless error analysis is unsound. “[A] ‘miscarriage of justice’ should be declared only when the court, ‘after an examination of the entire cause, including the evidence,’ is of the ‘opinion’ that it is reasonably probable that a result more favorable to the appealing party would have been reached in the absence of the error.” *258(People v. Watson (1956) 46 Cal.2d 818, 836 [299 P.2d 243], italics added.) To establish prejudice, the majority would have to take into account all of the evidence—“the entire cause”—and explain why, based on all of the evidence, or at least all of the evidence the majority concluded was properly admitted, it was reasonably probable that defendant would have obtained a more favorable result without the disputed evidence. This harmless error analysis does not do that.
I would affirm.
For the same reasons, I would reject any argument that the trial court violated defendant’s due process rights by admitting the evidence.