Create a visual representation of four different female runners, representing different descents: Caucasian, Hispanic, Black, and Middle-Eastern. They are all engaged in an outdoor running activity, each on their unique path, with a clear sky overhead. There is no text in the image. Each runner is wearing athletic running gear in different colors - red, blue, green, and purple to symbolize their different individual paths. These runners symbolize Mandi, Amy, Nicole, and Olivia, respectively. They are sprinting at a pace which represents their different distances and times.

Mandi, Amy, Nicole, and Olivia all ran different distances in different time intervals. Their distances (in

miles) and times (in minutes) are as follows:
----------

name <- c("Mandi", "Amy", "Nicole", "Olivia")
distance <- c(0.8, 3.1, 2.8, 4.0)
time <- c(10, 30, 40, 50)

-------------------
Write a line of code to convert time to hours. Remember there are 60 minutes in an hour. Then write a line of code to calculate the speed of each runner in miles per hour. Speed is distance divided by time.

Q1:
How many hours did Olivia run?

-------------------
Q2: What was Mandi's speed in miles per hour?

--------------------------
Q3: Which runner had the fastest speed?

--------------------

50/60 = 0.8333 is Olivia's number of hrs run

Mandi's speed is 0.8*60/10=48/10=4.8
Amy is fastest runner as she ran 3.1 miles in 30 minutes i.e., 6.2 miles per hour/60 minutes.

A1: Olivia ran for 0.8333333 hours.

A2: Mandi's speed was 0.08 miles per hour.

A3: Olivia had the fastest speed, with a speed of 4.8 miles per hour.

To convert time to hours, you can divide the time in minutes by 60.

To calculate the speed of each runner in miles per hour, you can divide the distance by the time converted to hours.

Here are the step-by-step solutions to your questions:

Q1: How many hours did Olivia run?

- Convert Olivia's time from minutes to hours by dividing 50 by 60:

```R
Olivia_time_in_hours <- 50 / 60
```

- Olivia ran for 0.8333 hours.

Q2: What was Mandi's speed in miles per hour?

- Convert Mandi's time from minutes to hours by dividing 10 by 60:

```R
Mandi_time_in_hours <- 10 / 60
```

- Calculate Mandi's speed by dividing her distance by her time in hours:

```R
Mandi_speed <- 0.8 / Mandi_time_in_hours
```

- Mandi's speed was 4.8 miles per hour.

Q3: Which runner had the fastest speed?

- Calculate the speed of all runners by dividing their distance by their time in hours:

```R
Mandi_speed <- 0.8 / Mandi_time_in_hours
Amy_speed <- 3.1 / (30 / 60)
Nicole_speed <- 2.8 / (40 / 60)
Olivia_speed <- 4.0 / (50 / 60)
```

- Compare the speeds of all runners to find the fastest speed:

```R
fastest_speed <- max(Mandi_speed, Amy_speed, Nicole_speed, Olivia_speed)
```

- The runner with the fastest speed is Olivia, with a speed of 4.8 miles per hour.

To convert time to hours, we divide the time by 60, since there are 60 minutes in an hour.

To calculate the speed of each runner in miles per hour, we divide the distance by the time in hours.

Here is the code to solve the given questions:

```R
name <- c("Mandi", "Amy", "Nicole", "Olivia")
distance <- c(0.8, 3.1, 2.8, 4.0)
time <- c(10, 30, 40, 50)

# Convert time to hours
time_in_hours <- time / 60

# Calculate the speed of each runner in miles per hour
speed <- distance / time_in_hours

# Q1: How many hours did Olivia run?
olivia_time <- time_in_hours[name == "Olivia"]

# Q2: What was Mandi's speed in miles per hour?
mandi_speed <- speed[name == "Mandi"]

# Q3: Which runner had the fastest speed?
fastest_runner <- name[which.max(speed)]
```

Q1: To find out how many hours Olivia ran, we can use the `time_in_hours` vector with indexing. We find the element in `name` vector where the name is "Olivia" and then find the corresponding element in `time_in_hours` using the same index. So the answer would be `olivia_time`.

Q2: To find Mandi's speed in miles per hour, we can use the `speed` vector with indexing. We find the element in `name` vector where the name is "Mandi" and then find the corresponding element in `speed` using the same index. So the answer would be `mandi_speed`.

Q3: To find the runner with the fastest speed, we can use the `which.max()` function on the `speed` vector. This function returns the position of the maximum value in the vector. We then use this position to find the corresponding name in the `name` vector. So the answer would be `fastest_runner`.