A child psychiatrist told a court that Angela Wrightson's teen killer didn't understand the effects of her brutal attack due to being surrounded by violence at home.
Dr Chakrabarti said the older defendant's exposure from a young age trivialised her understanding of the consequences.
He added a serious attack on the girl's mother coupled with her low IQ is likely to have affected her ability to form a rational judgement and understand how the brutal attack on Angela Wrightson would lead to her death.
Related story: Teenage girl admits killing Angela Wrightson, but denies murder on ground of diminished responsibility
The trial heard the girl has been diagnosed as suffering from an abnormality of mental functioning arising out of a recognised medical condition.
Dr Chakrabarti said the emotional symptoms of the condition would make her react violently to comments like those alleged to have been made by Ms Wrightson about members of the girl's family.
Giving evidence for the defence he said: "The nature of her illness would make her a person who is very aggressive and dangerous and cruel to others.
"She would be unable to form a rational judgement due to the nature of the mental disorder in question.
"When she is violent she would tend to believe that the level of her aggression is not serious enough to cause either serious harm or death."
Dr Chakrabarti said the girl's condition would have been aggravated by cider and drugs which she took on the night of the fatal attack but added: "Her mental disorder certainly had a role to play."
He added in his opinion the girl's mental condition played a significant role in her attacking Ms Wrightson.
If the jury agree the girl would be cleared of murder but be guilty of manslaughter due to diminished responsibility.
The jury was told the girl had a troubled early family life.
The court heard one of her tutors described her as "the most volatile young person" she had ever worked with.
She was due to be seen by a psychiatrist due to her disruptive behaviour the day after the fatal attack.
Dr Chakrabarti is due to be cross examined by the prosecution on Thursday. The trial at Leeds Crown Court continues.