Project: Exploring NYC Public School Test Result Scores
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    Photo by Jannis Lucas on Unsplash.

    Every year, American high school students take SATs, which are standardized tests intended to measure literacy, numeracy, and writing skills. There are three sections - reading, math, and writing, each with a maximum score of 800 points. These tests are extremely important for students and colleges, as they play a pivotal role in the admissions process.

    Analyzing the performance of schools is important for a variety of stakeholders, including policy and education professionals, researchers, government, and even parents considering which school their children should attend.

    You have been tasked with answering three key questions about New York City (NYC) public school SAT performance:

    Which schools produce the highest math scores?

    • Specifically, which schools have an average math SAT score of at least 80%?
    • Save the results as a pandas DataFrame called best_math_schools.

    Who are the top 10 schools based on average results across reading, math, and writing?

    • Save the results as a pandas DataFrame called top_10_schools.

    Which NYC borough has the largest standard deviation for SAT results?

    • Save the results as a pandas DataFrame called largest_std_dev.
    #import packages
    
    import pandas as pd
    
    #import datasets
    
    schools = pd.read_csv('schools.csv')
    schools.head()                      

    1. Finding schools with the best math scores.

    • Subset the data to find the schools with math scores of at least 80%
    best_math_schools = schools[schools["average_math"] >= 640][['school_name' , 'average_math']].sort_values(by = 'average_math' , ascending = False)
    
    best_math_schools.head()

    2. Identifying the top 10 performing schools.

    • Find the 10 best performing schools based on total score across the three SAT sections.
    schools['total_SAT'] = schools['average_math'] + schools['average_writing'] + schools['average_reading']
    
    top_10_schools = schools[['school_name' , 'total_SAT']].sort_values(by='total_SAT' , ascending = False).head(10)
    
    top_10_schools

    3. Locating the NYC borough with the largest standard deviation in SAT performance.

    • Find out the number of schools, average SAT, and standard deviation of SAT for the NYC borough with the largest standard deviation.
    largest_std_dev = schools.groupby('borough').agg( num_schools = ('school_name' , 'count') , average_SAT = ('total_SAT' , 'mean') , std_SAT = ('total_SAT' , 'std')).round(2).reset_index().sort_values(by = 'std_SAT' , ascending = False)
    
    largest_std_dev.head()