As always, though, correlation != causation. It could well be the case that half of children (autistic or not) have some extra innate capacity for socialization, and that typical parenting choices don't provide those children as much social input as their brain wants at a certain stage of development, and hence they make up imaginary friends to interact with in order to satisfy their enhanced social needs. In other words, the imaginary friends could be an effect rather than a cause.