Step-by-step explanation:
In this study the independent variable was considered as the sleeping habits and the dependent variable was considered as the behavior of the child. It was seen that the children who had sleep disorders had behavioral issues. Your friend thinks that due to the fact that the children had sleeping disorders they had behavioral issue. This hypothesis could be wrong.
The sleep disorders could be a confounding variable. Even though it is true that children with sleep disorders have higher levels of behavioral issues other issues are not considered. Other factors should be considered and the actual independent variable should be found.