Inherently synchronous motors:
Ali is the Chairman of a committee. In how many ways can a committee of 5 be chosen from 10 people given that Ali must be one of them?
The average life of a fridge compressor motor is 10 years, with a standard deviation of 2 years. If the manufacturer is willing to replace only 3% of the motor because of failures, how long a guarantee should the manufacturer offer?
Assume that the lives of the motors follow a normal distribution.
An internet outage (internet blackout) in Pulau Pinang occurs according to a Poisson distribution with an average of 3 failures every twenty weeks. Calculate the probability that there will not be more than one failure during a particular week.
(Hint: A Poisson distribution with mean has probability mass function )
A production process produces thousands of temperature transducers. Let denote the number of nonconforming transducers in a sample of size 30 selected at random from the process. Which of the following is a reasonable probability model for ?
Which best describes aggregation in data analysis?
After grouping and aggregating, what typically happens to the number of rows in the dataset?
What will be the output of the following code?
import pandas as pd
data = {'Category': ['A', 'A', 'B', 'B', 'C'], 'Value': [5, 15, 25, 35, 45], 'Score': [2, 4, 6, 8, 10]}
df = pd.DataFrame(data)
result = df.groupby('Category').agg({'Value': 'sum', 'Score': 'mean'})
print(result)
What will be the output of the following code?
import pandas as pd
data = {'Category': ['A', 'A', 'B', 'B', 'C'], 'Subcategory': ['X', 'Y', 'X', 'Y', 'X'], 'Value': [10, 20, 30, 40, 50]}
df = pd.DataFrame(data)
result = df.pivot(index='Category', columns='Subcategory', values='Value')
print(result)