Danny would like to determine whether his quality of sleep is improved by running for an extra 10 minutes.
The quality of sleep can be taken to be the number of hours he is able to sleep before he wakes up. To determine if running for an extra 10 minutes improves the quality of sleep, Danny has to change the duration of time he runs for and measure the number of hours he is able to sleep in each case.
The independent variable in this experiment is the number of minutes he runs for and the dependent variable is the number of hours he is able to sleep. All other factors should be kept constant. For instance, Danny should not vary the time at which he goes to sleep, he should try to eat the same kind of food and the activities before going to sleep should also remain the same.
If he currently runs for T minutes, he should run for T and T+10 minutes on alternate days. In each of the cases, the duration of sleep should be measured. This should be done for several days and then the average number of hours he was able to sleep for in each of the cases should be calculated. Taking a larger number of measurements helps to eliminate differences that may be caused due to factors that would not be possible for him to keep constant over each of the days he takes his measurements. If he is able to sleep for a longer duration of time when he runs for 10 minutes extra, it would confirm that running improves the quality of sleep.