"Hi, my solution gives the exact numerical values as the proposed solution, but it doesn't pass the tests. Am I missing something, or is this a bug?
def findrevenueby_city(transactions: pd.DataFrame,
users: pd.DataFrame,
exchange_rate: pd.DataFrame) -> pd.DataFrame:
gets user city for each user id
userids = users[['id', 'usercity']]
and merge on transactions
transactions = transactions.merge(user_ids, how='left"
Gabriel P. - "Hi, my solution gives the exact numerical values as the proposed solution, but it doesn't pass the tests. Am I missing something, or is this a bug?
def findrevenueby_city(transactions: pd.DataFrame,
users: pd.DataFrame,
exchange_rate: pd.DataFrame) -> pd.DataFrame:
gets user city for each user id
userids = users[['id', 'usercity']]
and merge on transactions
transactions = transactions.merge(user_ids, how='left"See full answer
"Schema is wrong - id from product is mapped to id from transactions, id from product should point to product_id in transcations table"
Arshad P. - "Schema is wrong - id from product is mapped to id from transactions, id from product should point to product_id in transcations table"See full answer
"import pandas as pd
\# Sample data for the employees table
data = {
'id': [1, 2, 3, 4, 5],
'first_name': ['John', 'Jane', 'Jim', 'Jake', 'Jill'],
'last_name': ['Doe', 'Smith', 'Brown', 'Taylor', 'Wilson'],
'salary': [30000, 25000, 45000, 20000, 35000],
'department_id': [101, 102, 103, 104, 105]
}
\# Creating a DataFrame from the data
df = pd.DataFrame(data)
\# Sorting the DataFrame by 'salary' in ascending order and selecting the top 3 lowest earners
lowestearningemployees = df.sort_values(by="
Jiggy - "import pandas as pd
\# Sample data for the employees table
data = {
'id': [1, 2, 3, 4, 5],
'first_name': ['John', 'Jane', 'Jim', 'Jake', 'Jill'],
'last_name': ['Doe', 'Smith', 'Brown', 'Taylor', 'Wilson'],
'salary': [30000, 25000, 45000, 20000, 35000],
'department_id': [101, 102, 103, 104, 105]
}
\# Creating a DataFrame from the data
df = pd.DataFrame(data)
\# Sorting the DataFrame by 'salary' in ascending order and selecting the top 3 lowest earners
lowestearningemployees = df.sort_values(by="See full answer
"In the expected value of a coupon problem, you calculated variance of a binomial distribution, and used the satandard deviation, square root of variance, to calculate the confidence interval. Will that approach work the same here?
For fair coin: (Heads = 0, tails = 1)
Var = 10 * (.5)(1-.5) = 2.5
Stdev = Sqrt(2.5) = 1.581
Mean = 5
Z-score = (Observed Val - Mean) / Stdev = (10 - 5) / 1.581 = 3.164
P val = 0.0008% (Slightly different from the video's solution of 0.00097)
Pros of this approach: It"
Connor W. - "In the expected value of a coupon problem, you calculated variance of a binomial distribution, and used the satandard deviation, square root of variance, to calculate the confidence interval. Will that approach work the same here?
For fair coin: (Heads = 0, tails = 1)
Var = 10 * (.5)(1-.5) = 2.5
Stdev = Sqrt(2.5) = 1.581
Mean = 5
Z-score = (Observed Val - Mean) / Stdev = (10 - 5) / 1.581 = 3.164
P val = 0.0008% (Slightly different from the video's solution of 0.00097)
Pros of this approach: It"See full answer
"The production must be something that people enjoy and do not shun as fake. Because of this, I would add some kind of likeliness factor to see if people would enjoy it. This strategy can even be done as a survey or something similar beforehand."
John H. - "The production must be something that people enjoy and do not shun as fake. Because of this, I would add some kind of likeliness factor to see if people would enjoy it. This strategy can even be done as a survey or something similar beforehand."See full answer
"Clarify Questions:
Is this app in Facebook app? or we build a different app for this? - Yes, this is in FB app now.
Will we have monetization in the first launch or launch it for free first? - Free first, but there is a potential monetization in the future.
Context: we will launch Facebook Jobs in two weeks, indicating that this is a new product.
I want to step back a bit, why this is important for Meta. Meta mission is to make it easier to build community and bring the world closer"
Nayla D. - "Clarify Questions:
Is this app in Facebook app? or we build a different app for this? - Yes, this is in FB app now.
Will we have monetization in the first launch or launch it for free first? - Free first, but there is a potential monetization in the future.
Context: we will launch Facebook Jobs in two weeks, indicating that this is a new product.
I want to step back a bit, why this is important for Meta. Meta mission is to make it easier to build community and bring the world closer"See full answer
"Context / Goal:
Have we seen this decrease in response time over a while (week/month) or short time (day/hours) - Over the last few months
How is Employer Response time calculated? - Average time from an employee applying for a job to an employer responding - This isn’t accounting for the increase in listings / number of applicants but does it need to?
Was there a change to how response time is calculated? - No
Can job listings be duplicates? - Yes, but not likely
i"
Nikitha G. - "Context / Goal:
Have we seen this decrease in response time over a while (week/month) or short time (day/hours) - Over the last few months
How is Employer Response time calculated? - Average time from an employee applying for a job to an employer responding - This isn’t accounting for the increase in listings / number of applicants but does it need to?
Was there a change to how response time is calculated? - No
Can job listings be duplicates? - Yes, but not likely
i"See full answer
"Top three most important variables Uber could use to estimate the ETA for passenger pickup, beyond the ETA on Google Maps can be:
Driver related - sometimes driver cancel rides after they are assigned or agree to pickup, especially at odd hours. Sometimes, they can also cancel midway through their journeys. Other factor can be that they drive slower or faster than google maps ETA.
Car related - The car may be old or not maintained well than other cars. It can be CNG, Diesel, petrol or elec"
Malvika S. - "Top three most important variables Uber could use to estimate the ETA for passenger pickup, beyond the ETA on Google Maps can be:
Driver related - sometimes driver cancel rides after they are assigned or agree to pickup, especially at odd hours. Sometimes, they can also cancel midway through their journeys. Other factor can be that they drive slower or faster than google maps ETA.
Car related - The car may be old or not maintained well than other cars. It can be CNG, Diesel, petrol or elec"See full answer
"Clarifying Q
Is the search traffic meaning # visits clicked through the 'search' button from the homepage(search CTR)? or does this include # pages viewed after the search result pages (search depth)?
Hypothesis
I believe introducing Gen AI as a default feature on the Google's search box will increase #search traffic. I assume the biggest user pain point within current google homepage is that deciding on a keyword for search. Unlike other alternative platforms such as"
Cj K. - "Clarifying Q
Is the search traffic meaning # visits clicked through the 'search' button from the homepage(search CTR)? or does this include # pages viewed after the search result pages (search depth)?
Hypothesis
I believe introducing Gen AI as a default feature on the Google's search box will increase #search traffic. I assume the biggest user pain point within current google homepage is that deciding on a keyword for search. Unlike other alternative platforms such as"See full answer
"i do feel like the question itself is kind of confusing. Youtube does have a product called YouTube’s Analytics, which is a channel analytics tool for creator lol"
Anonymous Ferret - "i do feel like the question itself is kind of confusing. Youtube does have a product called YouTube’s Analytics, which is a channel analytics tool for creator lol"See full answer
"How much does the Empire State Building weigh?
I will estimate the weight of the Empire State Building using a structured approach. I’ll start with clarifying questions, define an equation, make reasonable assumptions, perform calculations, and address trade-offs and potential errors.
Clarifying Questions
To refine the scope, I considered:
How many floors does the Empire State Building have?
What is the area per floor?
What materials are used (e.g., steel, concrete)"
Nishtha - "How much does the Empire State Building weigh?
I will estimate the weight of the Empire State Building using a structured approach. I’ll start with clarifying questions, define an equation, make reasonable assumptions, perform calculations, and address trade-offs and potential errors.
Clarifying Questions
To refine the scope, I considered:
How many floors does the Empire State Building have?
What is the area per floor?
What materials are used (e.g., steel, concrete)"See full answer
"Gradient Descent is an optimisation strategy used in several supervised learning models. It is the technique for finding the optimum solution of an objective function. Typically, for a linear regression use case, it is used to find the weights and bias that produce the lowest loss.
It involves computing the partial derivative of the objective function with respect to the weight and bias vectors. To find the optima of the function, the derivative is equated to 0, and iteratively the weight and b"
Megha V. - "Gradient Descent is an optimisation strategy used in several supervised learning models. It is the technique for finding the optimum solution of an objective function. Typically, for a linear regression use case, it is used to find the weights and bias that produce the lowest loss.
It involves computing the partial derivative of the objective function with respect to the weight and bias vectors. To find the optima of the function, the derivative is equated to 0, and iteratively the weight and b"See full answer
"Because testing many engagement metrics at once increases the risk of finding effects that aren't real (the 'multiple comparisons problem'), you must adjust your criteria for statistical significance. For social media data, the Benjamini-Hochberg procedure is often a practical choice as it controls the rate of false discoveries (FDR) while still allowing you to detect genuine changes; however, the ideal adjustment method will vary depending on your specific number of metrics (e.g., use Bonferron"
Lucas G. - "Because testing many engagement metrics at once increases the risk of finding effects that aren't real (the 'multiple comparisons problem'), you must adjust your criteria for statistical significance. For social media data, the Benjamini-Hochberg procedure is often a practical choice as it controls the rate of false discoveries (FDR) while still allowing you to detect genuine changes; however, the ideal adjustment method will vary depending on your specific number of metrics (e.g., use Bonferron"See full answer
"To speed up A/B tests results with limited sample sizes, we can apply advanced techniques like CUPED to reduce variance for faster statistical significance, interleaving to gather more comparative data per user (e.g., ranking), MAB to dynamically allocate traffic to winning variations for quicker optimization (e.g., campaigns), and Bayesian A/B testing which offers probabilistic conclusions that can be reached earlier. Each method, when appropriately applied, allows you to gain m"
Lucas G. - "To speed up A/B tests results with limited sample sizes, we can apply advanced techniques like CUPED to reduce variance for faster statistical significance, interleaving to gather more comparative data per user (e.g., ranking), MAB to dynamically allocate traffic to winning variations for quicker optimization (e.g., campaigns), and Bayesian A/B testing which offers probabilistic conclusions that can be reached earlier. Each method, when appropriately applied, allows you to gain m"See full answer