├── requirements.txt ├── LICENSE ├── README.md ├── annotate.py ├── generate.py ├── utils.py ├── models.py ├── prompt.py ├── refine.py ├── icl_samples.py ├── math_utils.py └── test_data └── SAT.json /requirements.txt: -------------------------------------------------------------------------------- 1 | torch==2.3.0+cu121 2 | transformers==4.41.2 3 | openai==0.27.8 4 | vllm==0.4.3 5 | sympy==1.12.1 6 | latex2sympy2 7 | backoff -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 dinobby 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [MAgICoRe: A Multi-Agent Coarse-to-Fine Refinement Framework for Reasoning](https://arxiv.org/abs/2409.12147) 2 | 3 | [Justin Chih-Yao Chen](https://dinobby.github.io/), [Archiki Prasad](https://archiki.github.io/), [Swarnadeep Saha](https://swarnahub.github.io/), [Elias Stengel-Eskin](https://esteng.github.io/), and [Mohit Bansal](https://www.cs.unc.edu/~mbansal/) 4 | 5 | image 6 | 7 | # Installation 8 | This repository is tested on Python 3.10.12. All dependencies can be installed as follows: 9 | 10 | ``` 11 | pip install -r requirements.txt 12 | ``` 13 | 14 | # Run Experiment 15 | Step 1: use the following script to generate $k$ reasoning chains for each problem. 16 | ``` 17 | CUDA_VISIBLE_DEVICES=0,1 python generate.py --k 40 18 | ``` 19 | 20 | Step 2: use the following script to get RM scores for the first iteration. 21 | ``` 22 | CUDA_VISIBLE_DEVICES=0,1 python annotate.py --k 40 23 | ``` 24 | 25 | Step 3: use the following script to refine hard instances. 26 | ``` 27 | CUDA_VISIBLE_DEVICES=0,1 python refine.py --k 40 28 | ``` 29 | 30 | `k` corresponds to the number of generations for each problem. 31 | 32 | # Citation 33 | ``` 34 | @article{chen2024magicore, 35 | title={MAgICoRe: A Multi-Agent Coarse-to-Fine Refinement Framework for Reasoning}, 36 | author={Chen, Justin Chih-Yao and Prasad, Archiki and Saha, Swarnadeep and Stengel-Eskin, Elias and Bansal, Mohit}, 37 | journal={arXiv preprint arXiv:2409.12147}, 38 | year={2024} 39 | } 40 | ``` 41 | -------------------------------------------------------------------------------- /annotate.py: -------------------------------------------------------------------------------- 1 | import time 2 | import json 3 | import glob 4 | import random 5 | import argparse 6 | import warnings 7 | import numpy as np 8 | from utils import * 9 | from math_utils import * 10 | from models import ORM, PRM 11 | from tqdm import tqdm 12 | from scipy.stats import entropy 13 | from collections import Counter 14 | 15 | import torch 16 | import accelerator 17 | from transformers import AutoTokenizer, pipeline 18 | from transformers import AutoModelForCausalLM 19 | 20 | warnings.filterwarnings('ignore') 21 | 22 | if __name__ == '__main__': 23 | parser = argparse.ArgumentParser() 24 | parser.add_argument('--task', default='GSM8K', type=str) 25 | parser.add_argument('--model', default='Llama3', type=str) 26 | parser.add_argument('--k', default=40, type=int) 27 | parser.add_argument('--batch_size', default=10, type=int) 28 | 29 | args = parser.parse_args() 30 | task = args.task 31 | model_name = args.model 32 | batch_size = args.batch_size 33 | files = glob.glob(f"./pred/{task}/{model_name}/0.*.json") 34 | samples = merge_samples(enumerate(files), args.k) 35 | 36 | orm = ORM() 37 | prm = PRM() 38 | 39 | num_correct = 0 40 | for sample in samples: 41 | if is_math_correct(sample['majority'], sample['gold_answer']): 42 | num_correct += 1 43 | print("majority acc: ", round((num_correct / len(samples)), 4)) 44 | 45 | for sample in tqdm(samples): 46 | question = sample['question'] 47 | reasoning = sample['reasoning'] 48 | pred = sample['pred'] 49 | gold_answer = sample['gold_answer'] 50 | orm_scores, prm_scores = [], [] 51 | steps_with_scores = [] 52 | 53 | for b in range(0, len(reasoning), batch_size): 54 | orm_score = orm.get_outcome_rewards(question, reasoning[b:b+batch_size]) 55 | orm_scores.extend(orm_score) 56 | 57 | for r, p in zip(reasoning, pred): 58 | r = prm.add_step_lines(r) 59 | step_with_score = prm.add_pr_to_question(question, r) 60 | steps_with_scores.append(step_with_score) 61 | if p: 62 | prm_score = prm.get_process_reward(question, prm.reformat_for_prm_CoT(r)).tolist() 63 | prm_scores.append(prm_score) 64 | else: 65 | prm_scores.append([0]) 66 | continue 67 | 68 | sample['step_with_score'] = steps_with_scores 69 | sample['orm_scores'] = orm_scores 70 | sample['prm_scores'] = prm_scores 71 | 72 | with open(f"./pred/{task}/{model_name}/annotated_{args.k}.json", "w") as f: 73 | json.dump(samples, f) -------------------------------------------------------------------------------- /generate.py: -------------------------------------------------------------------------------- 1 | import os 2 | import time 3 | import json 4 | import glob 5 | import torch 6 | import datetime 7 | import argparse 8 | import warnings 9 | import numpy as np 10 | from tqdm import tqdm 11 | from utils import * 12 | from math_utils import * 13 | from vllm import LLM, SamplingParams 14 | from transformers import AutoTokenizer, AutoModelForCausalLM 15 | 16 | warnings.filterwarnings('ignore') 17 | 18 | if __name__ == '__main__': 19 | parser = argparse.ArgumentParser() 20 | parser.add_argument('--task', default='GSM8K', type=str) 21 | parser.add_argument('--model', default='Llama3', type=str) 22 | parser.add_argument('--k', default=40, type=int) 23 | args = parser.parse_args() 24 | task = args.task 25 | model = args.model 26 | 27 | with open(f"./test_data/{task}.json", "r") as f: 28 | test_samples = json.load(f) 29 | 30 | if model == "Llama3": 31 | model_id = "meta-llama/Meta-Llama-3-8B-Instruct" 32 | tokenizer = AutoTokenizer.from_pretrained(model_id) 33 | sampling_params = SamplingParams(temperature=0.8, top_p=0.95, max_tokens=1000, stop_token_ids=[tokenizer.eos_token_id]) 34 | llm = LLM(model=model_id) 35 | prompts = [f"<|start_header_id|>user<|end_header_id|>\n\n{i['question']} Place your answer in \\boxed{{}}.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\nStep 1:" for i in test_samples] 36 | 37 | for _ in range(args.k): 38 | outputs = llm.generate(prompts, sampling_params) 39 | results = [] 40 | for output in outputs: 41 | results.append(output.outputs[0].text) 42 | 43 | results = [] 44 | for i in range(len(test_samples)): 45 | tmp = {} 46 | tmp['question'] = test_samples[i]['question'] 47 | tmp['gold_answer'] = test_samples[i]['gold_answer'] 48 | tmp['reasoning'] = "Step 1:" + results[i] 49 | if task in ["MATH"]: 50 | tmp['pred'] = parse_math_boxed(results[i]) 51 | if task in ["GSM8K", "SVAMP"]: 52 | tmp['pred'] = parse_boxed(results[i]) 53 | elif task in ["MMLU", "SAT"]: 54 | tmp['pred'] = get_choice(results[i]) 55 | results.append(tmp) 56 | 57 | acc = evaluate_math(results) 58 | timestamp = datetime.datetime.now().strftime('%m%d_%H%M') 59 | 60 | filename = f"./pred/{task}/{model}/{acc}_{timestamp}.json" 61 | os.makedirs(os.path.dirname(filename), exist_ok=True) 62 | with open(filename, "w") as f: 63 | json.dump(results, f) -------------------------------------------------------------------------------- /utils.py: -------------------------------------------------------------------------------- 1 | import io 2 | import re 3 | import ast 4 | import sys 5 | import time 6 | import json 7 | import openai 8 | import random 9 | import backoff 10 | import numpy as np 11 | import pandas as pd 12 | from math_utils import is_math_correct 13 | from tqdm.notebook import tqdm 14 | import matplotlib.pyplot as plt 15 | from collections import Counter 16 | from openai.error import RateLimitError, APIError, ServiceUnavailableError, APIConnectionError, InvalidRequestError 17 | 18 | # fill in yours 19 | openai.api_type = "" 20 | openai.api_base = "" 21 | openai.api_version = "" 22 | openai.api_key = "" 23 | openai.azure_endpoint = "" 24 | 25 | @backoff.on_exception(backoff.constant, (KeyError, RateLimitError, APIError, ServiceUnavailableError, APIConnectionError), interval=20, max_tries=5) 26 | def gpt_generate(model, prompt): 27 | assert model in ["gpt3", "gpt4"] 28 | if model == "gpt3": 29 | engine = "gpt-35-turbo-1106" 30 | elif model == "gpt4": 31 | engine = "gpt-4-1106" 32 | else: 33 | print("invalid model name.") 34 | return None 35 | contexts = [{"role": "user", "content": f"{prompt}"}] 36 | try: 37 | completion = openai.ChatCompletion.create( 38 | engine=engine, 39 | messages=contexts, 40 | temperature=1) 41 | except InvalidRequestError: 42 | return None 43 | except Exception as e: 44 | print(e) 45 | output = completion['choices'][0]['message']['content'] 46 | return output 47 | 48 | def std_normalize(data, mean, std): 49 | if type(data) is list: 50 | data = np.array(data) 51 | output = (data - mean) / std 52 | return output 53 | 54 | def get_choice(text): 55 | if text: 56 | match = re.findall(r'([A|B|C|D|E])\)', text) 57 | if not match: 58 | match = re.findall(r'([A|B|C|D|E])', text) 59 | return match[-1] if match else "N/A" 60 | 61 | def merge_samples(files, k): 62 | CoT_results = {idx: json.load(open(f)) for idx, f in files} 63 | samples = [] 64 | for i in tqdm(range(len(CoT_results[0]))): 65 | tmp = {} 66 | tmp['pred'] = [] 67 | tmp['reasoning'] = [] 68 | for k, CoT_result in CoT_results.items(): 69 | tmp['question'] = CoT_result[i]['question'] 70 | tmp['gold_answer'] = CoT_result[i]['gold_answer'] 71 | if len(tmp['pred']) < k: 72 | tmp['pred'].append(CoT_result[i]['pred']) 73 | tmp['reasoning'].append(CoT_result[i]['reasoning']) 74 | 75 | majority = Counter(tmp['pred']).most_common(1)[0][0] 76 | tmp['majority'] = majority 77 | samples.append(tmp) 78 | return samples 79 | 80 | def get_top_k_values(data, k): 81 | return dict(sorted(data.items(), key=lambda item: item[1], reverse=True)[:k]) 82 | 83 | def get_top_k(pred, reasoning, orm_scores, prm_scores, k): 84 | prm_scores = [np.prod(i) for i in prm_scores] 85 | combined = list(zip(pred, reasoning, orm_scores, prm_scores)) 86 | sorted_list = sorted(combined, key=lambda x: x[2] + x[3], reverse=True) 87 | top_k_pred = [item[0] for item in sorted_list[:k]] 88 | top_k_reasoning = [item[1] for item in sorted_list[:k]] 89 | top_k_orm = [item[2] for item in sorted_list[:k]] 90 | top_k_prm = [item[3] for item in sorted_list[:k]] 91 | return top_k_pred, top_k_reasoning, top_k_orm, top_k_prm -------------------------------------------------------------------------------- /models.py: -------------------------------------------------------------------------------- 1 | import re 2 | import torch 3 | import accelerator 4 | from transformers import AutoModel, AutoTokenizer, pipeline, AutoModelForCausalLM 5 | 6 | class ORM: 7 | def __init__(self, model_name="internlm/internlm2-7b-reward", device=0): 8 | self.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True) 9 | self.model = AutoModel.from_pretrained( 10 | "internlm/internlm2-7b-reward", 11 | device_map=f"cuda:{device}", 12 | torch_dtype=torch.float16, 13 | trust_remote_code=True 14 | ) 15 | 16 | def format_chat(self, question, answer): 17 | chat = [ 18 | {"role": "user", "content": f"{question}"}, 19 | {"role": "assistant", "content": f"{answer}"} 20 | ] 21 | return chat 22 | 23 | def get_outcome_reward(self, question, answer): 24 | chat = self.format_chat(question, answer) 25 | outcome_reward = self.model.get_score(self.tokenizer, chat) 26 | return outcome_reward 27 | 28 | def get_outcome_rewards(self, question, answers): 29 | chats = [] 30 | for a in answers: 31 | chat = self.format_chat(question, a) 32 | chats.append(chat) 33 | r = self.model.get_scores(self.tokenizer, chats) 34 | outcome_rewards = torch.nn.functional.sigmoid(torch.tensor(r)).tolist() 35 | return outcome_rewards 36 | 37 | class PRM: 38 | def __init__(self, model_name="peiyi9979/math-shepherd-mistral-7b-prm", device=1): 39 | good_token = '+' 40 | bad_token = '-' 41 | step_tag = 'ки' 42 | 43 | self.prm_tokenizer = AutoTokenizer.from_pretrained(model_name) 44 | self.prm_tokenizer.pad_token = self.prm_tokenizer.eos_token 45 | self.candidate_tokens = self.prm_tokenizer.encode(f"{good_token} {bad_token}")[1:] # [648, 387] 46 | self.step_tag_id = self.prm_tokenizer.encode(f"{step_tag}")[-1] # 12902 47 | self.prm = AutoModelForCausalLM.from_pretrained(model_name, 48 | torch_dtype=torch.bfloat16, 49 | device_map=f'cuda:{device}').eval() 50 | 51 | def get_process_reward(self, question, reasoning): 52 | input_for_prm = [f"{question} {reasoning}"] 53 | input_id = self.prm_tokenizer(input_for_prm, padding=True, return_tensors="pt").input_ids.to(self.prm.device) 54 | with torch.no_grad(): 55 | logits = self.prm(input_id).logits[:,:,self.candidate_tokens] 56 | scores = logits.softmax(dim=-1)[:,:,0] 57 | step_scores = scores[input_id == self.step_tag_id] 58 | return step_scores 59 | 60 | def add_pr_to_question(self, question, reasoning): 61 | reasoning = self.reformat_for_prm_CoT(reasoning) 62 | prs = self.get_process_reward(question, reasoning).tolist() 63 | whole_text = self.add_process_reward(reasoning, prs) 64 | return whole_text 65 | 66 | def add_step_lines(self, text): 67 | text = text.replace("\n\n", "\n") 68 | text = re.sub(r"\n(Step [2-9])", r"\1", text).strip() 69 | return re.sub(r"(Step [2-9])", r"\n\n\1", text) 70 | 71 | def get_step_score_pair(self, chunk): 72 | pairs = re.findall(r"(.+?)\(Score: (0.\d+)\)", chunk, re.DOTALL) 73 | results = [] 74 | for p in pairs: 75 | results.append((p[0], float(p[1]))) 76 | return results 77 | 78 | def reformat_for_prm_CoT(self, text): 79 | text = text.strip() 80 | text = text.replace("\n\n", " ки\n") 81 | text = text + " ки" 82 | return text 83 | 84 | def add_process_reward(self, text, scores): 85 | parts = text.split('ки') 86 | res = [] 87 | for part, score in zip(parts, scores): 88 | res.append(f"{part} (Score: {int(round(score, 1)*10)}/10)\n") 89 | formatted_text = "".join(res) 90 | return formatted_text 91 | 92 | def get_answer_out_of_boxed(self, text): 93 | text = text.split("I hope it is correct")[0] 94 | res = re.findall(r"final answer is (.*). ", text) 95 | return res[-1] if res else None -------------------------------------------------------------------------------- /prompt.py: -------------------------------------------------------------------------------- 1 | c_postfix = """### Question:\n{question}\n\n### Current Solution:\n{cur_sol}\n\n<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\nLet's review the steps with lower scores and identify the errors.""" 2 | r_postfix = """### Question:\n{question}\n\n### Current Solution:\n{cur_sol}\n\n### Teacher Feedback:\n{feedback}\n\n<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n### Revised Solution:\n\nLet's review the solution and the feedback, and then refine the current solution.\nAfter reviewing the solution and feedback, let's solve this math problem again.""" 3 | 4 | llama_reviewer_prompt = """<|start_header_id|>user<|end_header_id|> 5 | 6 | Your task is to provide step-by-step feedback to the current solution. 7 | You will be given a math problem and a current solution, along with the scores for each step based on its correctness. 8 | - You will find (Score: n/10) at the end of each step. 9 | - The maximum (best) score is 10, which means that this step is 100% correct (and 0% incorrect). 10 | - The minimum (worst) score is 0, which means that this step is 100% incorrect (and 0% correct). 11 | - Pay attention to the steps having scores lower than 6, and carefully identify the errors in those steps. 12 | - Provide your explanation of the error and how it can be fixed. DO NOT propose a new solution, just the explanation. 13 | 14 | ### Question: 15 | {icl_question} 16 | 17 | ### Current Solution: 18 | {icl_solution} 19 | 20 | <|eot_id|><|start_header_id|>assistant<|end_header_id|> 21 | 22 | Let's review the steps with lower scores and identify the errors. 23 | 24 | {icl_feedback} 25 | 26 | <|start_header_id|>user<|end_header_id|> 27 | 28 | """ 29 | 30 | # ========================================================================================================================== 31 | 32 | llama_refiner_prompt = """<|start_header_id|>user<|end_header_id|> 33 | 34 | Your task is to fix the error in the given solution, based on the teacher's feedback. 35 | - After reviewing the solution and feedback, provide a better solution to fix the mistakes you found. 36 | - Your final answer must be in A, B, C, or D. Place your final answer in \\boxed{{}}. 37 | 38 | ### Question: 39 | {icl_question} 40 | 41 | ### Current Solution: 42 | {icl_solution} 43 | 44 | ### Teacher Feedback: 45 | {icl_feedback} 46 | 47 | <|eot_id|><|start_header_id|>assistant<|end_header_id|> 48 | 49 | ### Revised Solution: 50 | 51 | Let's review the solution and the feedback, and then refine the current solution. 52 | After reviewing the solution and feedback, let's solve this math problem again. 53 | 54 | {icl_refined_solution} 55 | 56 | <|start_header_id|>user<|end_header_id|> 57 | 58 | """ 59 | 60 | # ==================================================================================== 61 | 62 | gpt_reviewer_prompt = """Your task is to provide step-by-step feedback to the current solution. 63 | You will be given a math problem and a current solution, along with the scores for each step based on its correctness. 64 | - You will find (Score: n/10) at the end of each step. 65 | - The maximum (best) score is 10, which means that this step is 100% correct (and 0% incorrect). 66 | - The minimum (worst) score is 0, which means that this step is 100% incorrect (and 0% correct). 67 | - Pay attention to the steps having scores lower than 6, and carefully identify the errors in those steps. 68 | - Provide your explanation of the error and how it can be fixed. DO NOT propose a new solution, just the explanation. 69 | 70 | ### Question: 71 | {icl_question} 72 | 73 | ### Current Solution: 74 | {icl_solution} 75 | 76 | Let's review the steps with lower scores and identify the errors. 77 | 78 | {icl_feedback} 79 | 80 | """ 81 | 82 | # ========================================================================================================================== 83 | 84 | gpt_refiner_prompt = """Your task is to fix the error in the given solution, based on the teacher's feedback. 85 | - After reviewing the solution and feedback, provide a better solution to fix the mistakes you found. 86 | - Your final answer must be in A, B, C, or D. Place your final answer in \\boxed{{}}. 87 | 88 | ### Question: 89 | {icl_question} 90 | 91 | ### Current Solution: 92 | {icl_solution} 93 | 94 | ### Teacher Feedback: 95 | {icl_feedback} 96 | 97 | ### Revised Solution: 98 | 99 | Let's review the solution and the feedback, and then refine the current solution. 100 | After reviewing the solution and feedback, let's solve this math problem again. 101 | 102 | {icl_refined_solution} 103 | 104 | """ 105 | -------------------------------------------------------------------------------- /refine.py: -------------------------------------------------------------------------------- 1 | import time 2 | import json 3 | import glob 4 | import random 5 | import argparse 6 | import warnings 7 | import numpy as np 8 | from tqdm.notebook import tqdm 9 | from utils import * 10 | from prompt import * 11 | from math_utils import * 12 | from models import ORM, PRM 13 | from scipy.stats import entropy 14 | from collections import Counter 15 | from icl_samples import icl_sample 16 | import torch 17 | import accelerator 18 | from transformers import AutoTokenizer, pipeline, AutoModelForCausalLM 19 | from vllm import LLM, SamplingParams 20 | 21 | warnings.filterwarnings('ignore') 22 | 23 | if __name__ == '__main__': 24 | parser = argparse.ArgumentParser() 25 | parser.add_argument('--task', default='GSM8K', type=str) 26 | parser.add_argument('--model', default='Llama3', type=str) 27 | parser.add_argument('--k', default=40, type=int) 28 | parser.add_argument('--batch_size', default=10, type=int) 29 | parser.add_argument('--iter', default=3, type=int) 30 | 31 | args = parser.parse_args() 32 | task = args.task 33 | model_name = args.model 34 | batch_size = args.batch_size 35 | iters = args.iter 36 | 37 | orm = ORM(device=1) 38 | prm = PRM(device=2) 39 | model_id = "meta-llama/Meta-Llama-3-8B-Instruct" 40 | vllm_tokenizer = AutoTokenizer.from_pretrained(model_id) 41 | sampling_params = SamplingParams(temperature=0.8, top_p=0.95, min_tokens=50, max_tokens=1000, stop_token_ids=[vllm_tokenizer.eos_token_id]) 42 | llm = LLM(model=model_id, tensor_parallel_size=1) 43 | 44 | icl_question = icl_sample[task]['question'] 45 | icl_solution = icl_sample[task]['solution'] 46 | icl_feedback = icl_sample[task]['feedback'] 47 | icl_refined_solution = icl_sample[task]['refined_solution'] 48 | 49 | reviewer_icl = llama_reviewer_prompt.format(icl_question=icl_question, icl_solution=icl_solution, icl_feedback=icl_feedback) 50 | refinement_icl = llama_refiner_prompt.format(icl_question=icl_question, icl_solution=icl_solution, icl_feedback=icl_feedback, icl_refined_solution=icl_refined_solution) 51 | 52 | with open(f"./pred/{task}/{model_name}/annotated_{args.k}.json", "r") as f: 53 | samples = json.load(f) 54 | 55 | for sample in samples: 56 | sample['iter0_orm'] = sample['orm_scores'] 57 | sample['iter0_prm'] = sample['prm_scores'] 58 | sample['iter0_reasoning'] = sample['reasoning'] 59 | sample['iter0_pred'] = sample['pred'] 60 | 61 | all_scores = [] 62 | for i in samples: 63 | all_scores.append(i['orm_scores'][0] + np.product(i['prm_scores'][0])) 64 | 65 | reward_avg = np.mean(all_scores) 66 | reward_std = np.std(all_scores) 67 | 68 | for n in range(iters): 69 | num_need_refinement = 0 70 | for sample in samples: 71 | assert len(sample[f'iter{n}_pred']) == len(sample[f'iter{n}_orm']) == len(sample[f'iter{n}_prm']) 72 | pred, orms, prms = sample[f'iter{n}_pred'], sample[f'iter{n}_orm'], sample[f'iter{n}_prm'] 73 | 74 | rewards = [] 75 | for p, o, s in zip(pred, orms, prms): 76 | if is_math_correct(p, sample['majority']): 77 | s = np.product(s) 78 | reward = (o+s) 79 | reward = std_normalize(reward, reward_avg, reward_std) 80 | rewards.append(reward) 81 | 82 | # condition 1 83 | if np.mean(rewards) < 0.0: 84 | sample['cond1'] = 'false' 85 | else: 86 | sample['cond1'] = 'true' 87 | 88 | # condition 2 89 | orm_votes, prm_votes = {}, {} 90 | for p, o, s in zip(pred, orms, prms): 91 | s = np.product(s) 92 | if p not in orm_votes: 93 | orm_votes[p] = o 94 | else: 95 | orm_votes[p] += o 96 | 97 | if p not in prm_votes: 98 | prm_votes[p] = s 99 | else: 100 | prm_votes[p] += s 101 | 102 | orm_pq = [count for item, count in orm_votes.items()] 103 | orm_uncertainty = torch.nn.functional.sigmoid(torch.tensor(entropy(orm_pq))).item() 104 | orm_confidence = 2 * (1 - orm_uncertainty) 105 | 106 | prm_pq = [count for item, count in prm_votes.items()] 107 | prm_uncertainty = torch.nn.functional.sigmoid(torch.tensor(entropy(prm_pq))).item() 108 | prm_confidence = 2 * (1 - prm_uncertainty) 109 | 110 | if sample['cond1'] == 'false' and (orm_confidence < 0.5 or prm_confidence < 0.5): 111 | sample['cond2'] = 'false' 112 | sample['need_refinement'] = 'yes' 113 | num_need_refinement += 1 114 | else: 115 | sample['cond2'] = 'true' 116 | sample['need_refinement'] = 'no' 117 | 118 | for sample in tqdm(samples): 119 | if sample['need_refinement'] == 'yes': 120 | tqdm.write(f"yes") 121 | question = sample['question'] 122 | reasoning = sample[f'iter{n}_reasoning'] 123 | pred = sample[f'iter{n}_pred'] 124 | 125 | steps_with_scores = [] 126 | for r, p in zip(reasoning, pred): 127 | r = prm.add_step_lines(r) 128 | step_with_score = prm.add_pr_to_question(question, r) 129 | steps_with_scores.append(step_with_score) 130 | 131 | reviewer_prompts = [] 132 | for res in steps_with_scores: 133 | reviewer_postfix = c_postfix.format(question=question, cur_sol=res) 134 | reviewer_prompt = reviewer_icl + reviewer_postfix 135 | reviewer_prompts.append(reviewer_prompt) 136 | 137 | outputs = llm.generate(reviewer_prompts, sampling_params, use_tqdm=False) 138 | feedback = [output.outputs[0].text for output in outputs] 139 | 140 | refine_prompts = [] 141 | for res, fb in zip(steps_with_scores, feedback): 142 | refine_postfix = r_postfix.format(question=question, cur_sol=res, feedback=fb) 143 | refinement_prompt = refinement_icl + refine_postfix 144 | refine_prompts.append(refinement_prompt) 145 | 146 | outputs = llm.generate(refine_prompts, sampling_params, use_tqdm=False) 147 | updated_sol = [output.outputs[0].text for output in outputs] 148 | if task in ["MATH"]: 149 | updated_pred = [parse_math_boxed(i) for i in updated_sol] 150 | elif task in ["GSM8K", "SVAMP"]: 151 | updated_pred = [parse_boxed(i) for i in updated_sol] 152 | elif task in ["MMLU", "SAT"]: 153 | updated_pred = [get_choice(i) for i in updated_sol] 154 | 155 | prm_scores = [] 156 | steps_with_scores = [] 157 | for r, p in zip(updated_sol, updated_pred): 158 | r = prm.add_step_lines(r) 159 | step_with_score = prm.add_pr_to_question(question, r) 160 | steps_with_scores.append(step_with_score) 161 | if p: 162 | prm_score = prm.get_process_reward(question, prm.reformat_for_prm_CoT(r)).tolist() 163 | prm_scores.append(prm_score) 164 | else: 165 | prm_scores.append([0]) 166 | continue 167 | 168 | orm_scores = [] 169 | for b in range(0, len(updated_sol), batch_size): 170 | orm_score = orm.get_outcome_rewards(question, updated_sol[b:b+batch_size]) 171 | orm_scores.extend(orm_score) 172 | 173 | sample[f'iter{n+1}_orm'] = orm_scores 174 | sample[f'iter{n+1}_prm'] = prm_scores 175 | sample[f'iter{n+1}_steps_with_scores'] = steps_with_scores 176 | sample[f'iter{n+1}_reasoning'] = updated_sol 177 | sample[f'iter{n+1}_pred'] = updated_pred 178 | else: 179 | sample[f'iter{n+1}_orm'] = sample['iter0_orm'] 180 | sample[f'iter{n+1}_prm'] = sample['iter0_prm'] 181 | sample[f'iter{n+1}_reasoning'] = sample['iter0_reasoning'] 182 | sample[f'iter{n+1}_pred'] = sample['iter0_pred'] 183 | 184 | print(f"Evaluating for the {n} iteration") 185 | num_correct = 0 186 | for sample in samples: 187 | if sample['need_refinement'] == 'yes': 188 | reasoning = sample['iter0_reasoning'] + sample['iter1_reasoning'] 189 | pred = sample[f'iter{n}_pred'] + sample[f'iter{n+1}_pred'] 190 | prm_scores = sample[f'iter{n}_prm'] + sample[f'iter{n+1}_prm'] 191 | orm_scores = sample[f'iter{n}_orm'] + sample[f'iter{n+1}_orm'] 192 | else: 193 | reasoning = sample[f'iter{n}_reasoning'] 194 | pred = sample[f'iter{n}_pred'] 195 | prm_scores = sample[f'iter{n}_prm'] 196 | orm_scores = sample[f'iter{n}_orm'] 197 | 198 | pred, reasoning, orm_scores, prm_scores = get_top_k(pred, reasoning, orm_scores, prm_scores, args.k) 199 | sample[f'iter{n+1}_top_pred'] = pred 200 | sample[f'iter{n+1}_top_reasoning'] = reasoning 201 | sample[f'iter{n+1}_top_orm'] = orm_scores 202 | sample[f'iter{n+1}_top_prm'] = prm_scores 203 | 204 | votes = {} 205 | for p, o, s in zip(pred, orm_scores, prm_scores): 206 | if p: 207 | s = np.product(s) 208 | if p not in votes: 209 | votes[p] = (o+s) 210 | else: 211 | votes[p] += (o+s) 212 | 213 | ans = max(votes, key=votes.get) 214 | if is_math_correct(ans, sample['gold_answer']): 215 | num_correct += 1 216 | acc = round((num_correct / len(samples)), 3) 217 | print(acc) 218 | 219 | with open(f"./pred/{task}/{model_name}/refined_{args.k}.json", "w") as f: 220 | json.dump(samples, f) -------------------------------------------------------------------------------- /icl_samples.py: -------------------------------------------------------------------------------- 1 | icl_sample = {"MMLU": {"question": "A group of hikers climbed from Salt Flats (elevation −55 feet)to Talon Bluff (elevation 620 feet). What is the difference in elevation between Talon Bluff and Salt Flats?\nThe options are: A)565 feet B)575 feet C)665 feet D)675 feet\nYour final answer should be chosen from A, B, C or D.", 2 | "solution": "Step 1: Calculate the difference in elevation between Talon Bluff and Salt Flats\nTalon Bluff elevation - Salt Flats elevation = ? (Score: 9/10)\n\nStep 2: Calculate the difference in elevation\n620 ft - (-55 ft) = ? (Score: 9/10)\n\nStep 3: Convert the minus sign to a positive sign\n620 ft - 55 ft = ? (Score: 3/10)\n\nStep 4: Add the numbers\n620 - 55 = 665 ft\nThe correct answer is \boxed{C)665 feet}. (Score: 1/10)", 3 | "feedback": "Step 1: This step is correct, and the high score of 9 reflects it.\n\nStep 2: This step is correct, and the high score of 9 reflects it.\n\nStep 3: The low score of 3 suggests an error in this step. It does not really convert the minus sign to a positive sign. It should be 620 + 55 instead of 620 - 55.\n\nStep 4: The low score of 1 suggests an error in this step. It should be adding 620 and 55, and the answer should be D) 675.", 4 | "refined_solution": "Step 1: Calculate the difference in elevation between Talon Bluff and Salt Flats\nTalon Bluff elevation - Salt Flats elevation = ?\n\nStep 2: Calculate the difference in elevation\n620 ft - (-55 ft) = ?\n\nStep 3: Convert the minus sign to a positive sign\n620 ft + 55 ft = ?\n\nStep 4: Add the numbers\n675 ft\n\nTherefore, the correct answer is \\boxed{D)675 feet}.", 5 | "orm_score": "1"}, 6 | 7 | "MATH": {"question": "What is the positive difference between the two solutions of $|x + 5| = 20$?", 8 | "solution": "Step 1: Solve $|x+5|=20.$ \begin{align*}\n|x+5|&=20\\\n\Rightarrow\qquad x+5&=20\text{ or } x+5=-20\\\n\Rightarrow\qquad x&=15\text{ or }x=-25\n\end{align*} (Score: 10/10)\n\nStep 2: Calculate the positive difference between the two solutions. \begin{align*}\n|x+5|=20&\Rightarrow\qquad |15-(-25)|=20\\\n&\Rightarrow\qquad |40|=20\\\n&\Rightarrow\qquad 20=\boxed{20}\n\end{align*}\nFinal Answer: The final answer is 20. I hope it is correct. (Score: 3/10)", 9 | "feedback": "Step 1: This step is correct, and the high score of 10 reflects it. \n\nStep 2: The low score of 3 suggests an error in this step. The problem asks for the positive difference between the two solutions, not to verify if 20 equals 20. Also, it wrotes |15-(-25)| = 20, which is incorrect. The actual calculation should be |15-(-25)| = |15+25| = |40| = 40, not 20.", 10 | "refined_solution": "Step 1: Solve $|x+5|=20.$ \begin{align*}\n|x+5|&=20\\\n\Rightarrow\qquad x+5&=20\text{ or } x+5=-20\\\n\Rightarrow\qquad x&=15\text{ or }x=-25\n\end{align*}\n\nStep 2: Calculate the positive difference between the two solutions\nTo find the positive difference, we subtract the smaller value from the larger value:\nDifference = |15 - (-25)| = |15 + 25| = |40| = 40\nTherefore, the correct answer is \\boxed{40}.", 11 | "orm_score": "3"}, 12 | 13 | "GSM8K": {"question": "Tobias is buying a new pair of shoes that costs $95. He has been saving up his money each month for the past three months. He gets a $5 allowance a month. He also mows lawns and shovels driveways. He charges $15 to mow a lawn and $7 to shovel. After buying the shoes, he has $15 in change. If he mows 4 lawns, how many driveways did he shovel?", 14 | "solution": "Step 1: Calculate the money he earned mowing lawns. 4 lawns for 15 dollars each is 15 * 4 = 60 dollars. (Score: 7/10)\n\nStep 2: He gets 5 dollars a month in allowance. For 3 months, he gets 5 * 3 = 15 dollars. (Score: 7/10)\n\nStep 3: 95 - 60 - 15 = 20 dollars. He had 20 dollars left after buying the shoes. Since he has 15 dollars left after buying the shoes, that means he saved 5 dollars. So he must have earned 5 dollars from shoveling driveways. 7 dollars per driveway, so 5 / 7 = 0.71 driveways. Round to 1 driveway. The answer is \boxed{1}. (Score: 2/10)", 15 | "feedback": "Step 1: This step is correct, and the high score of 7 reflects it.\n\nStep 2: This step is correct, and the high score of 7 reflects it.\n\nStep 3: The low score of 2 suggests an error in this step. The calculation 95 - 60 - 15 = 20 is incorrect. This should be 95 + 60 + 15, as we're calculating the total money Tobias had before buying the shoes, not subtracting the cost of the shoes yet.\nThe statement \"He had 20 dollars left after buying the shoes\" contradicts the problem, which states he has $15 in change after buying the shoes.\n\nThe reasoning about saving $5 and earning $5 from shoveling driveways is flawed. We need to calculate the total money earned and then subtract the cost of the shoes and the remaining change.\nDividing 5 by 7 and rounding to 1 driveway is incorrect. We need to find how many driveways he shoveled to make up the difference between his total earnings and expenses.", 16 | "refined_solution": "Step 1: Calculate the money he earned mowing lawns.\n4 lawns for 15 dollars each is 15 * 4 = 60 dollars.\n\nStep 2: Calculate his allowance money.\nHe gets 5 dollars a month in allowance. For 3 months, he gets 5 * 3 = 15 dollars.\n\nStep 3: Calculate the total money needed and determine how much he earned from shoveling.\nTotal money spent = Cost of shoes + Money left as change = $95 + $15 = $110\nMoney earned from lawns and allowance = $60 + $15 = $75\nMoney earned from shoveling = Total money spent - Money from lawns and allowance\nMoney from shoveling = $110 - $75 = $35\n\nStep 4: Calculate the number of driveways shoveled.\nHe charges $7 to shovel a driveway.\nNumber of driveways = Money from shoveling ÷ Price per driveway\nNumber of driveways = $35 ÷ $7 = 5\n\nTherefore, the correct answer is \\boxed{5}", 17 | "orm_score": "2"}, 18 | 19 | "SVAMP": {"question": "28 children were riding on the bus. At the bus stop 82 children got on the bus while some got off the bus. Then there were 30 children altogether on the bus. How many more children got on the bus than those that got off?", 20 | "solution": "Step 1: Calculate the number of children on the bus initially.\n28 children were riding on the bus initially. (Score: 9/10)\n\nStep 2: Calculate the number of children who got on the bus.\n82 children got on the bus. (Score: 9/10)\n\nStep 3: Calculate the total number of children on the bus after some got off.\n30 children were on the bus after some got off. (Score: 9/10)\n\nStep 4: Calculate the number of children who got off the bus.\nThe total number of children on the bus after some got off is 30. The number of children who got on the bus is 82. The initial number of children on the bus is 28. So, the total number of children who got on the bus and got off the bus is 28 + 82 = 110. To find the number of children who got off, subtract the initial number of children from the total number of children who got on and got off: 110 - 28 = 82. (Score: 3/10)\n\nStep 5: Calculate the number of children who got on the bus minus the number of children who got off. The number of children who got on the bus is 82. The number of children who got off is 82. Subtract the number of children who got off from the number of children who got on: 82 - 82 = 0. (Score: 2/10)\n\nSo, the number of children who got on the bus minus the number of children who got off is \\boxed{0}. (Score: 1/10)", 21 | "feedback": "Step 1: This step is correct, and the high score of 9 reflects it. 28 children were riding on the bus initially.\n\nStep 2: This step is correct, and the high score of 9 reflects it. 82 children got on the bus.\n\nStep 3: This step is correct, and the high score of 9 reflects it. 30 children were on the bus after some got off.\n\nStep 4: The low score of 3 suggests an error in this step. The total number after the new children got on and some got off is 30. With 28 initially and 82 getting on, if no one got off, there would be 110 on the bus. Therefore, to achieve a total of 30 on the bus, the number of children who got off would be: 28 + 82 − 30 = 80.\nThis means 80 children must have gotten off the bus for there to be 30 children remaining.\n\nStep 5: The low score of 2 suggests an error in this step. From the correct calculation in the revised Step 4, we know 82 children got on and 80 got off. The error in this step comes from maintaining the incorrect figures from Step 4. To find how many more children got on than got off, we should use the corrected figures: 82 - 80 = 2.", 22 | "refined_solution": "Step 1: 28 children were riding on the bus initially.\n\nStep 2: 82 children got on the bus.\n\nStep 3: 30 children were on the bus after some got off.\n\nStep 4: The total number after the new children got on and some got off is 30. With 28 initially and 82 getting on, if no one got off, there would be 110 on the bus. Therefore, to achieve a total of 30 on the bus, the number of children who got off would be: 28 + 82 − 30 = 80.\n\nStep 5: 82 children got on and 80 got off. To find how many more children got on the bus than those who got off: 82 - 80 = 2.\n\nTherefore, the correct answer is \\boxed{2}.", 23 | "orm_score": "1"}, 24 | 25 | "SAT": {"question": "Which of the following numbers is NOT a solution of the inequality $3 x-5 \\geq 4 x-3$ ?\nThe options are: (A)-1 (B)-2 (C)-3 (D)-5\nYour final answer should be chosen from A, B, C or D.", 26 | "solution": "Step 1: Write down the inequality.\n$$3x-5 \geq 4x-3$$ (Score: 10/10)\n\nStep 2: Add 5 to both sides.\n$$3x-5+5 \geq 4x-3+5$$\n$$3x \geq 4x-2$$ (Score: 4/10)\n\nStep 3: Subtract 3x from both sides.\n$$3x-3x \geq 4x-3x-2$$\n$$0 \geq x-2$$ (Score: 2/10)\n\nStep 4: Add 2 to both sides.\n$$0+2 \geq x-2+2$$\n$$2 \geq x$$ (Score: 1/10)\n\nStep 5: The inequality is $x \leq 2$.\nThe number that is NOT a solution of the inequality $x \leq 2$ is $\boxed{\textbf{(C) } 3}$.\nFinal Answer: The final answer is C. I hope it is correct. (Score: 1/10)", 27 | "feedback": "Step 1: This step is correct, and the high score of 10 reflects it. \n\nStep 2: The low score of 4 suggests an error in this step. The addition of 5 to both sides is correct, but there's an error in simplification. The right side should be 4x+2, not 4x-2.\n\nStep 3: The low score of 2 suggests an error in this step. This step is incorrect because it's based on the error in Step 2. Also, subtracting 3x from both sides would result in -x on the left, not 0.\n\nStep 4: The low score of 1 suggests an error in this step. This step continues the errors from previous steps. Additionally, the inequality sign should be flipped when dividing or multiplying by a negative number, which wasn't done here.\n\nStep 5: The low score of 1 suggests an error in this step. The conclusion $x \leq 2$ is incorrect due to the accumulation of errors in previous steps. The original inequality was never solved correctly, so the final answer is based on faulty reasoning.\nTo solve this problem correctly, we should:\n\n1. Correctly simplify after adding 5 to both sides.\n2. Subtract 4x (not 3x) from both sides.\n3. Divide by -1, remembering to flip the inequality sign.", 28 | "refined_solution": "Step 1: Write down the original inequality.\n$$3x-5 \geq 4x-3$$\n\nStep 2: Subtract 4x from both sides to get all terms with x on one side.\n$$3x-4x-5 \geq 4x-4x-3$$\n$$-x-5 \geq -3$$\n\nStep 3: Add 5 to both sides to isolate the term with x.\n$$-x-5+5 \geq -3+5$$\n$$-x \geq 2$$\n\nStep 4: Multiply both sides by -1. Remember to flip the inequality sign when multiplying by a negative number.\n$$x \leq -2$$\n\nStep 5: Option (A) -1 is the only one that doesn't satisfy the inequality $$x \leq -2$$.\nTherefore, the correct answer is \\boxed{(A) -1}.", 29 | "orm_score": "1"}, 30 | } -------------------------------------------------------------------------------- /math_utils.py: -------------------------------------------------------------------------------- 1 | import re 2 | import json 3 | import signal 4 | from collections import Counter 5 | from sympy import sympify, simplify 6 | from latex2sympy2 import latex2sympy 7 | 8 | def floatify(num): 9 | try: 10 | num = float(num) 11 | return num 12 | except Exception as e: 13 | return None 14 | 15 | def within_eps(pred, gt): 16 | pred = floatify(pred) 17 | gt = floatify(gt) 18 | if pred is None or gt is None: 19 | return False 20 | eps = abs(gt-pred) 21 | if eps < 0.01: 22 | return True 23 | else: 24 | return False 25 | 26 | def _fix_fracs(string): 27 | substrs = string.split("\\frac") 28 | new_str = substrs[0] 29 | if len(substrs) > 1: 30 | substrs = substrs[1:] 31 | for substr in substrs: 32 | new_str += "\\frac" 33 | if substr[0] == "{": 34 | new_str += substr 35 | else: 36 | try: 37 | assert len(substr) >= 2 38 | except: 39 | return string 40 | a = substr[0] 41 | b = substr[1] 42 | if b != "{": 43 | if len(substr) > 2: 44 | post_substr = substr[2:] 45 | new_str += "{" + a + "}{" + b + "}" + post_substr 46 | else: 47 | new_str += "{" + a + "}{" + b + "}" 48 | else: 49 | if len(substr) > 2: 50 | post_substr = substr[2:] 51 | new_str += "{" + a + "}" + b + post_substr 52 | else: 53 | new_str += "{" + a + "}" + b 54 | string = new_str 55 | return string 56 | 57 | 58 | def _fix_a_slash_b(string): 59 | if len(string.split("/")) != 2: 60 | return string 61 | a = string.split("/")[0] 62 | b = string.split("/")[1] 63 | try: 64 | a = int(a) 65 | b = int(b) 66 | assert string == "{}/{}".format(a, b) 67 | new_string = "\\frac{" + str(a) + "}{" + str(b) + "}" 68 | return new_string 69 | except: 70 | return string 71 | 72 | 73 | def _remove_right_units(string): 74 | # "\\text{ " only ever occurs (at least in the val set) when describing units 75 | string = str(string) 76 | if "\\text{ " in string: 77 | splits = string.split("\\text{ ") 78 | # assert len(splits) == 2 79 | return splits[0] 80 | else: 81 | return string 82 | 83 | 84 | def _fix_sqrt(string): 85 | if "\\sqrt" not in string: 86 | return string 87 | splits = string.split("\\sqrt") 88 | new_string = splits[0] 89 | for split in splits[1:]: 90 | if split[0] != "{": 91 | a = split[0] 92 | new_substr = "\\sqrt{" + a + "}" + split[1:] 93 | else: 94 | new_substr = "\\sqrt" + split 95 | new_string += new_substr 96 | return new_string 97 | 98 | 99 | def _strip_string(string): 100 | # linebreaks 101 | string = string.replace("\n", "") 102 | # print(string) 103 | 104 | # remove inverse spaces 105 | string = string.replace("\\!", "") 106 | # print(string) 107 | 108 | # replace \\ with \ 109 | string = string.replace("\\\\", "\\") 110 | # print(string) 111 | 112 | # replace tfrac and dfrac with frac 113 | string = string.replace("tfrac", "frac") 114 | string = string.replace("dfrac", "frac") 115 | # print(string) 116 | 117 | # remove \left and \right 118 | string = string.replace("\\left", "") 119 | string = string.replace("\\right", "") 120 | # print(string) 121 | 122 | # Remove circ (degrees) 123 | string = string.replace("^{\\circ}", "") 124 | string = string.replace("^\\circ", "") 125 | 126 | # remove dollar signs 127 | string = string.replace("\\$", "") 128 | 129 | # remove units (on the right) 130 | string = _remove_right_units(string) 131 | 132 | # remove percentage 133 | string = string.replace("\\%", "") 134 | string = string.replace("\%", "") 135 | 136 | # " 0." equivalent to " ." and "{0." equivalent to "{." Alternatively, add "0" if "." is the start of the string 137 | string = string.replace(" .", " 0.") 138 | string = string.replace("{.", "{0.") 139 | # if empty, return empty string 140 | if len(string) == 0: 141 | return string 142 | if string[0] == ".": 143 | string = "0" + string 144 | 145 | # to consider: get rid of e.g. "k = " or "q = " at beginning 146 | if len(string.split("=")) == 2: 147 | if len(string.split("=")[0]) <= 2: 148 | string = string.split("=")[1] 149 | 150 | # fix sqrt3 --> sqrt{3} 151 | string = _fix_sqrt(string) 152 | 153 | # remove spaces 154 | string = string.replace(" ", "") 155 | 156 | # \frac1b or \frac12 --> \frac{1}{b} and \frac{1}{2}, etc. Even works with \frac1{72} (but not \frac{72}1). Also does a/b --> \\frac{a}{b} 157 | string = _fix_fracs(string) 158 | 159 | # manually change 0.5 --> \frac{1}{2} 160 | if string == "0.5": 161 | string = "\\frac{1}{2}" 162 | 163 | # NOTE: X/Y changed to \frac{X}{Y} in dataset, but in simple cases fix in case the model output is X/Y 164 | string = _fix_a_slash_b(string) 165 | 166 | return string 167 | 168 | 169 | def last_boxed_only_string(string): 170 | idx = string.rfind("\\boxed") 171 | if idx < 0: 172 | idx = string.rfind("\\fbox") 173 | if idx < 0: 174 | return None 175 | 176 | i = idx 177 | right_brace_idx = None 178 | num_left_braces_open = 0 179 | while i < len(string): 180 | if string[i] == "{": 181 | num_left_braces_open += 1 182 | if string[i] == "}": 183 | num_left_braces_open -= 1 184 | if num_left_braces_open == 0: 185 | right_brace_idx = i 186 | break 187 | i += 1 188 | 189 | if right_brace_idx == None: 190 | retval = None 191 | else: 192 | retval = string[idx:right_brace_idx + 1] 193 | 194 | return retval 195 | 196 | 197 | def remove_boxed(s): 198 | left = "\\boxed{" 199 | try: 200 | assert s[:len(left)] == left 201 | assert s[-1] == "}" 202 | return s[len(left):-1] 203 | except: 204 | return None 205 | 206 | def parse_math_boxed(s): 207 | if not s: 208 | return "N/A" 209 | s = last_boxed_only_string(s) 210 | s = remove_boxed(s) 211 | return s 212 | 213 | def get_latex_value(expr): 214 | # get the actual numeric value of latex expression 215 | # handle cases like \sqrt{66} => 8.12 216 | # handle cases like 6\sqrt{2} => 8.49 217 | # handle cases like 2 \sqrt{5} => 4.47 218 | # handle cases like 3\pi => 9.42 219 | 220 | try: 221 | if '\\sqrt' in expr and expr.split("\\sqrt")[0]: 222 | multi_str = expr.split("\\sqrt")[0] 223 | multiplier = float(multi_str.strip()) 224 | multiplicand = "\\" + expr.split(multi_str+"\\")[-1] 225 | value = multiplier * float(latex2sympy(multiplicand).evalf()) 226 | else: 227 | value = float(latex2sympy(expr).evalf()) 228 | except: 229 | return expr 230 | return value 231 | 232 | 233 | def get_fraction_value(expr): 234 | # get the actual numeric value of fractions 235 | # handle cases like \frac{1}{4} => 0.25 236 | # handle cases like \frac{\pi}{3} => 1.05 237 | # handle cases like \\frac{3}{4} => 0.75 238 | # handle cases like \dfrac{1}{4} => 0.25 239 | # handle cases like \tfrac{1}{4} => 0.25 240 | # does not handle \frac{\sqrt{a}}{b} 241 | 242 | try: 243 | expr = expr.replace('\pi', '3.1416') 244 | frac_pattern = r"(\\\\d*t*frac|\\d*t*frac|rac)\{([^}]+)\}\{([^}]+)\}" 245 | def replace_frac(match): 246 | _, num, den = match.groups() 247 | return f"{num}/{den}" 248 | return float(eval(re.sub(frac_pattern, replace_frac, expr))) 249 | except Exception: 250 | return expr 251 | 252 | def normalize_fraction_notation(expr): 253 | """ 254 | Normalizes different fraction notations (\\frac, \frac, rac) into a consistent format. 255 | 256 | :param expr: A string containing the expression with fraction notations. 257 | :return: A string with the normalized fraction format. 258 | """ 259 | # Regular expression to find different fraction notations 260 | frac_pattern = r"(\\\\d*t*frac|\\d*t*frac|rac)\{([^}]+)\}\{([^}]+)\}" 261 | 262 | # Function to replace the fraction notations with (numerator)/(denominator) 263 | def replace_frac(match): 264 | _, num, den = match.groups() 265 | return f"({num})/({den})" 266 | 267 | return re.sub(frac_pattern, replace_frac, expr) 268 | 269 | 270 | def is_string_equiv(str1, str2, verbose=False): 271 | if str1 is None and str2 is None: 272 | print("WARNING: Both None") 273 | return True 274 | if str1 is None or str2 is None: 275 | return False 276 | 277 | try: 278 | ss1 = _strip_string(str1) 279 | ss2 = _strip_string(str2) 280 | if verbose: 281 | print(ss1, ss2) 282 | return ss1 == ss2 283 | except: 284 | return str1 == str2 285 | 286 | 287 | def is_frac_equiv(expr1, expr2): 288 | """ 289 | Determines whether two mathematical expressions, possibly containing different fraction notations, 290 | are equivalent. 291 | 292 | :param expr1: A string representing the first mathematical expression. 293 | :param expr2: A string representing the second mathematical expression. 294 | :return: True if the expressions are equivalent, False otherwise. 295 | """ 296 | try: 297 | # Normalize fraction notations 298 | expr1_sympy = normalize_fraction_notation(expr1) 299 | expr2_sympy = normalize_fraction_notation(expr2) 300 | 301 | # Convert the string expressions into sympy expressions 302 | sympy_expr1 = sympify(expr1_sympy) 303 | sympy_expr2 = sympify(expr2_sympy) 304 | 305 | # Simplify both expressions and check for equality 306 | return simplify(sympy_expr1 - sympy_expr2) == 0 307 | except Exception: 308 | 309 | return False 310 | 311 | def math_check1(pred, gt): 312 | 313 | signal.signal(signal.SIGALRM, timeout_handler) 314 | signal.alarm(5) # Set the alarm for timeout_duration seconds 315 | 316 | try: 317 | if is_frac_equiv(pred, gt): 318 | return True 319 | if is_string_equiv(pred, gt): 320 | return True 321 | numeric_gt_value = get_fraction_value(gt) 322 | numeric_pred_value = get_fraction_value(pred) 323 | if within_eps(pred, numeric_gt_value): 324 | return True 325 | if within_eps(numeric_pred_value, numeric_gt_value): 326 | return True 327 | numeric_gt_value = get_latex_value(gt) 328 | numeric_pred_value = get_latex_value(pred) 329 | if within_eps(pred, numeric_gt_value): 330 | return True 331 | if within_eps(numeric_pred_value, numeric_gt_value): 332 | return True 333 | except TimeoutException: 334 | return False 335 | finally: 336 | signal.alarm(0) 337 | return False 338 | 339 | def math_check2(pred, gt): 340 | if math_check1(_remove_right_units(pred), _remove_right_units(gt)): 341 | return True 342 | return False 343 | 344 | def is_math_correct(pred, gt): 345 | if math_check1(pred, gt): 346 | return True 347 | if math_check2(pred, gt): 348 | return True 349 | return False 350 | 351 | # Define a timeout exception class 352 | class TimeoutException(Exception): 353 | pass 354 | 355 | # Timeout handler function 356 | def timeout_handler(signum, frame): 357 | raise TimeoutException 358 | 359 | def evaluate_math(results): 360 | num_correct = 0 361 | for i in results: 362 | if is_math_correct(i['pred'], i['gold_answer']): 363 | num_correct += 1 364 | acc = round((num_correct / len(results)), 4) 365 | return acc -------------------------------------------------------------------------------- /test_data/SAT.json: -------------------------------------------------------------------------------- 1 | [{"question": "If $\\frac{x-1}{3}=k$ and $k=3$, what is the value of $x ?$\nThe options are: (A)2 (B)4 (C)9 (D)10\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "For $i=\\sqrt{-1}$, what is the sum $(7+3 i)+(-8+9 i) ?$\nThe options are: (A)$-1+12 i$ (B)$-1-6 i$ (C)$15+12 i$ (D)$15-6 i$ 3\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "On Saturday afternoon, Armand sent $m$ text messages each hour for 5 hours, and Tyrone sent $p$ text messages each hour for 4 hours. Which of the following represents the total number of messages sent by Armand and Tyrone on Saturday afternoon?\nThe options are: (A)$9 m p$ (B)$20 m p$ (C)$5 m+4 p$ (D)$4 m+5 p$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Kathy is a repair technician for a phone company. Each week, she receives a batch of phones that need repairs. The number of phones that she has left to fix at the end of each day can be estimated with the equation $P=108-23 d$, where $P$ is the number of phones left and $d$ is the number of days she has worked that week. What is the meaning of the value 108 in this equation?\nThe options are: (A)Kathy will complete the repairs within 108 days. (B)Kathy starts each week with 108 phones to fix. (C)Kathy repairs phones at a rate of 108 per hour. (D)Kathy repairs phones at a rate of 108 per day.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\left(x^{2} y-3 y^{2}+5 x y^{2}\\right)-\\left(-x^{2} y+3 x y^{2}-3 y^{2}\\right)$$Which of the following is equivalent to the expression above?\nThe options are: (A)$4 x^{2} y^{2}$ (B)$8 x y^{2}-6 y^{2}$ (C)$2 x^{2} y+2 x y^{2}$ (D)$2 x^{2} y+8 x y^{2}-6 y^{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$h=3 a+28.6$$A pediatrician uses the model above to estimate the height $h$ of a boy, in inches, in terms of the boy's age $a$, in years, between the ages of 2 and 5. Based on the model, what is the estimated increase, in inches, of a boy's height each year?\nThe options are: (A)3 (B)$\\quad 5.7$ (C)9.5 (D)14.3\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$m=\\frac{\\left(\\frac{r}{1,200}\\right)\\left(1+\\frac{r}{1,200}\\right)^{N}}{\\left(1+\\frac{r}{1,200}\\right)^{N}-1} P$$The formula above gives the monthly payment $m$ needed to pay off a loan of $P$ dollars at $r$ percent annual interest over $N$ months. Which of the following gives $P$ in terms of $m, r$, and $N$ ?\nThe options are: (A)$P=\\frac{\\left(\\frac{r}{1,200}\\right)\\left(1+\\frac{r}{1,200}\\right)^{N}}{\\left(1+\\frac{r}{1,200}\\right)^{N}-1} m$ (B)$P=\\frac{\\left(1+\\frac{r}{1,200}\\right)^{N}-1}{\\left(\\frac{r}{1,200}\\right)\\left(1+\\frac{r}{1,200}\\right)^{N}} m$ (C)$P=\\left(\\frac{r}{1,200}\\right) m$ (D)$P=\\left(\\frac{1,200}{r}\\right) m$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "If $\\frac{a}{b}=2$, what is the value of $\\frac{4 b}{a} ?$\nThe options are: (A)0 (B)1 (C)2 (D)4\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{array}{r}3 x+4 y=-23 \\\\2 y-x=-19\\end{array}$$What is the solution $(x, y)$ to the system of equations above?\nThe options are: (A)$(-5,-2)$ (B)$(3,-8)$ (C)$(4,-6)$ (D)$(9,-6)$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$g(x)=a x^{2}+24$$For the function $g$ defined above, $a$ is a constant and $g(4)=8$. What is the value of $g(-4)$ ?\nThe options are: (A)8 (B)0 (C)-1 (D)-8\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$\\begin{aligned}& b=2.35+0.25 x \\\\& c=1.75+0.40 x\\end{aligned}$$In the equations above, $b$ and $c$ represent the price per pound, in dollars, of beef and chicken, respectively, $x$ weeks after July 1 during last summer. What was the price per pound of beef when it was equal to the price per pound of chicken?\nThe options are: (A)$\\$ 2.60$ (B)$\\$ 2.85$ (C)$\\$ 2.95$ (D)$\\$ 3.35$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "A line in the $x y$-plane passes through the origin and has a slope of $\\frac{1}{7}$. Which of the following points lies on the line?\nThe options are: (A)$(0,7)$ (B)$(1,7)$ (C)$(7,7)$ (D)$(14,2)$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "If $x>3$, which of the following is equivalent to $\\frac{1}{\\frac{1}{x+2}+\\frac{1}{x+3}}$ ?\nThe options are: (A)$\\frac{2 x+5}{x^{2}+5 x+6}$ (B)$\\frac{x^{2}+5 x+6}{2 x+5}$ (C)$2 x+5$ (D)$x^{2}+5 x+6$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "If $3 x-y=12$, what is the value of $\\frac{8^{x}}{2^{y}} ?$\nThe options are: (A)$2^{12}$ (B)4 (C)$8^{2}$ (D)The value cannot be determined from the information given.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "If $(a x+2)(b x+7)=15 x^{2}+c x+14$ for all values of $x$, and $a+b=8$, what are the two possible values for $c$ ?\nThe options are: (A)3 and 5 (B)6 and 35 (C)10 and 21 (D)31 and 41\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "If $y=k x$, where $k$ is a constant, and $y=24$ when $x=6$, what is the value of $y$ when $x=5$ ?\nThe options are: (A)6 (B)15 (C)20 (D)23\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "If $16+4 x$ is 10 more than 14 , what is the value of $8 x$ ?\nThe options are: (A)2 (B)6 (C)16 (D)80 5\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{aligned}1 \\text { decagram } & =10 \\text { grams } \\\\1,000 \\text { milligrams } & =1 \\text { gram }\\end{aligned}$$A hospital stores one type of medicine in 2-decagram containers. Based on the information given in the box above, how many 1-milligram doses are there in one 2-decagram container?\nThe options are: (A)$\\quad 0.002$ (B)$\\quad 200$ (C)$\\quad 2,000$ (D)20,000\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "For what value of $n$ is $|n-1|+1$ equal to 0 ?\nThe options are: (A)0 (B)1 (C)2 (D)There is no such value of $n$.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "$$.a=1,052+1.08 t.$$.The speed of a sound wave in air depends on the air temperature. The formula above shows the relationship between $a$, the speed of a sound wave, in feet per second, and $t$, the air temperature, in degrees Fahrenheit $\\left({ }^{\\circ} \\mathrm{F}\\right)$.\n\nWhich of the following expresses the air temperature in terms of the speed of a sound wave?\nThe options are: (A)$t=\\frac{a-1,052}{1.08}$ (B)$t=\\frac{a+1,052}{1.08}$ (C)$t=\\frac{1,052-a}{1.08}$ (D)$t=\\frac{1.08}{a+1,052}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$.a=1,052+1.08 t.$$.The speed of a sound wave in air depends on the air temperature. The formula above shows the relationship between $a$, the speed of a sound wave, in feet per second, and $t$, the air temperature, in degrees Fahrenheit $\\left({ }^{\\circ} \\mathrm{F}\\right)$.\n\nAt which of the following air temperatures will the speed of a sound wave be closest to 1,000 feet per second?\nThe options are: (A)$-46^{\\circ} \\mathrm{F}$ (B)$-48^{\\circ} \\mathrm{F}$ (C)$-49^{\\circ} \\mathrm{F}$ (D)$-50^{\\circ} \\mathrm{F}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Which of the following numbers is NOT a solution of the inequality $3 x-5 \\geq 4 x-3$ ?\nThe options are: (A)-1 (B)-2 (C)-3 (D)-5\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "\\begin{center}\\begin{tabular}{|c|c|c|c|c|c|}\\cline { 3 - 5 }\\multicolumn{2}{c|}{} & \\multicolumn{3}{c|}{Course} & \\multicolumn{1}{c|}{} \\\\\\cline { 2 - 5 }\\multicolumn{2}{c|}{} & Algebra I & Geometry & $\\begin{array}{c}\\text { Algebra } \\\\ \\text { II }\\end{array}$ & \\multirow{2}{*}{Total} \\\\\\hline\\multirow{2}{*}{Gender} & Female & 35 & 53 & 62 & \\\\\\cline { 2 - 5 }& Male & 44 & 59 & 57 & 160 \\\\\\hline& Total & 79 & 112 & 119 & 310 \\\\\\hline\\end{tabular}\\end{center}A group of tenth-grade students responded to a survey that asked which math course they were currently enrolled in. The survey data were broken down as shown in the table above. Which of the following categories accounts for approximately 19 percent of all the survey respondents?\nThe options are: (A)Females taking Geometry (B)Females taking Algebra II (C)Males taking Geometry (D)Males taking Algebra I\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "\\begin{center}\\begin{tabular}{|c|c|c|c|c|c|c|}\\hline\\multicolumn{7}{|c|}{Lengths of Fish (in inches)} \\\\\\hline8 & 9 & 9 & 9 & 10 & 10 & 11 \\\\\\hline11 & 12 & 12 & 12 & 12 & 13 & 13 \\\\\\hline13 & 14 & 14 & 15 & 15 & 16 & 24 \\\\\\hline\\end{tabular}\\end{center}The table above lists the lengths, to the nearest inch, of a random sample of 21 brown bullhead fish. The outlier measurement of 24 inches is an error. Of the mean, median, and range of the values listed, which will change the most if the 24 -inch measurement is removed from the data?\nThe options are: (A)Mean (B)Median (C)Range (D)They will all change by the same amount.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{aligned}& y<-x+a \\\\& y>x+b\\end{aligned}$$In the $x y$-plane, if $(0,0)$ is a solution to the system of inequalities above, which of the following relationships between $a$ and $b$ must be true?\nThe options are: (A)$a>b$ (B)$b>a$ (C)$|a|>|b|$ (D)$a=-b$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "A food truck sells salads for $\\$ 6.50$ each and drinks for $\\$ 2.00$ each. The food truck's revenue from selling a total of 209 salads and drinks in one day was $\\$ 836.50$. How many salads were sold that day?\nThe options are: (A)77 (B)93 (C)99 (D)105\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Alma bought a laptop computer at a store that gave a 20 percent discount off its original price. The total amount she paid to the cashier was $p$ dollars, including an 8 percent sales tax on the discounted price. Which of the following represents the original price of the computer in terms of $p$ ?\nThe options are: (A)$0.88 p$ (B)$\\frac{p}{0.88}$ (C)$(0.8)(1.08) p$ (D)$\\frac{p}{(0.8)(1.08)}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Dreams Recalled during One Week\\begin{center}\\begin{tabular}{|l|c|c|c|c|}\\hline& None & 1 to 4 & 5 or more & Total \\\\\\hline\\hlineGroup X & 15 & 28 & 57 & 100 \\\\\\hlineGroup Y & 21 & 11 & 68 & 100 \\\\\\hlineTotal & 36 & 39 & 125 & 200 \\\\\\hline\\end{tabular}\\end{center}The data in the table above were produced by a sleep researcher studying the number of dreams people recall when asked to record their dreams for one week. Group X consisted of 100 people who observed early bedtimes, and Group Y consisted of 100 people who observed later bedtimes. If a person is chosen at random from those who recalled at least 1 dream, what is the probability that the person belonged to Group Y ?\nThe options are: (A)$\\frac{68}{100}$ (B)$\\frac{79}{100}$ (C)$\\frac{79}{164}$ (D)$\\frac{164}{200}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Which of the following is an equation of a circle in the $x y$-plane with center $(0,4)$ and a radius with endpoint $\\left(\\frac{4}{3}, 5\\right) ?$\nThe options are: (A)$x^{2}+(y-4)^{2}=\\frac{25}{9}$ (B)$x^{2}+(y+4)^{2}=\\frac{25}{9}$ (C)$x^{2}+(y-4)^{2}=\\frac{5}{3}$ (D)$x^{2}+(y+4)^{2}=\\frac{3}{5}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$h=-4.9 t^{2}+25 t$$The equation above expresses the approximate height $h$, in meters, of a ball $t$ seconds after it is launched vertically upward from the ground with an initial velocity of 25 meters per second. After approximately how many seconds will the ball hit the ground?\nThe options are: (A)3.5 (B)4.0 (C)4.5 (D)5.0\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Katarina is a botanist studying the production of pears by two types of pear trees. She noticed that Type A trees produced 20 percent more pears than Type B trees did. Based on Katarina's observation, if the Type A trees produced 144 pears, how many pears did the Type B trees produce?\nThe options are: (A)115 (B)120 (C)124 (D)173\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "A square field measures 10 meters by 10 meters. Ten students each mark off a randomly selected region of the field; each region is square and has side lengths of 1 meter, and no two regions overlap. The students count the earthworms contained in the soil to a depth of 5 centimeters beneath the ground's surface in each region. The results are shown in the table below.\\begin{center}\\begin{tabular}{|c|c|c|c|}\\hlineRegion & $\\begin{array}{c}\\text { Number of } \\\\ \\text { earthworms }\\end{array}$ & Region & $\\begin{array}{c}\\text { Number of } \\\\ \\text { earthworms }\\end{array}$ \\\\\\hlineA & 107 & $\\mathrm{~F}$ & 141 \\\\\\hlineB & 147 & $\\mathrm{G}$ & 150 \\\\\\hlineC & 146 & $\\mathrm{H}$ & 154 \\\\\\hlineD & 135 & $\\mathrm{I}$ & 176 \\\\\\hlineE & 149 & $\\mathrm{~J}$ & 166 \\\\\\hline\\end{tabular}\\end{center}Which of the following is a reasonable approximation of the number of earthworms to a depth of 5 centimeters beneath the ground's surface in the entire field?\nThe options are: (A)$\\quad 150$ (B)$\\quad 1,500$ (C)15,000 (D)150,000\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "For a polynomial $p(x)$, the value of $p(3)$ is -2 .Which of the following must be true about $p(x)$ ?\nThe options are: (A)$x-5$ is a factor of $p(x)$. (B)$x-2$ is a factor of $p(x)$. (C)$x+2$ is a factor of $p(x)$. (D)The remainder when $p(x)$ is divided by $x-3$ is -2 .\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "$$2 z+1=z$$What value of $z$ satisfies the equation above?\nThe options are: (A)-2 (B)-1 (C)$\\frac{1}{2}$ (D)1\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "A television with a price of $\\$ 300$ is to be purchased with an initial payment of $\\$ 60$ and weekly payments of $\\$ 30$. Which of the following equations can be used to find the number of weekly payments, $w$, required to complete the purchase, assuming there are no taxes or fees?\nThe options are: (A)$300=30 w-60$ (B)$300=30 w$ (C)$300=30 w+60$ (D)$300=60 w-30$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Shipping Charges\\begin{center}\\begin{tabular}{|c|c|}\\hline$\\begin{array}{c}\\text { Merchandise weight } \\\\ \\text { (pounds) }\\end{array}$ & $\\begin{array}{c}\\text { Shipping } \\\\ \\text { charge }\\end{array}$ \\\\\\hline5 & $\\$ 16.94$ \\\\\\hline10 & $\\$ 21.89$ \\\\\\hline20 & $\\$ 31.79$ \\\\\\hline40 & $\\$ 51.59$ \\\\\\hline\\end{tabular}\\end{center}The table above shows shipping charges for an online retailer that sells sporting goods. There is a linear relationship between the shipping charge and the weight of the merchandise. Which function can be used to determine the total shipping charge $f(x)$, in dollars, for an order with a merchandise weight of $x$ pounds?\nThe options are: (A)$f(x)=0.99 x$ (B)$f(x)=0.99 x+11.99$ (C)$f(x)=3.39 x$ (D)$f(x)=3.39 x+16.94$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\sqrt{9 x^{2}}$$If $x>0$, which of the following is equivalent to the given expression?\nThe options are: (A)$3 x$ (B)$3 x^{2}$ (C)$18 x$ (D)$18 x^{4}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$\\frac{x^{2}-1}{x-1}=-2$$What are all values of $x$ that satisfy the equation above?\nThe options are: (A)-3 (B)0 (C)1 (D)-3 and -1\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "A circle in the $x y$-plane has center $(5,7)$ and radius 2. Which of the following is an equation of the circle?\nThe options are: (A)$(x-5)^{2}+(y-7)^{2}=4$ (B)$(x+5)^{2}+(y+7)^{2}=4$ (C)$(x-5)^{2}+(y-7)^{2}=2$ (D)$(x+5)^{2}+(y+7)^{2}=2$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "In the $x y$-plane, the graph of the function $f(x)=x^{2}+5 x+4$ has two $x$-intercepts. What is the distance between the $x$-intercepts?\nThe options are: (A)1 (B)2 (C)3 (D)4\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\sqrt{4 x}=x-3$$What are all values of $x$ that satisfy the given equation?I. 1II. 9\nThe options are: (A)I only (B)II only (C)I and II (D)Neither I nor II\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\begin{aligned}& -3 x+y=6 \\\\& a x+2 y=4\\end{aligned}$$In the system of equations above, $a$ is a constant. For which of the following values of $a$ does the system have no solution?\nThe options are: (A)-6 (B)-3 (C)3 (D)6\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "A helicopter, initially hovering 40 feet above the ground, begins to gain altitude at a rate of 21 feet per second. Which of the following functions represents the helicopter's altitude above the ground $y$, in feet, $t$ seconds after the helicopter begins to gain altitude?\nThe options are: (A)$y=40+21$ (B)$y=40+21 t$ (C)$y=40-21 t$ (D)$y=40 t+21$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "If $20-x=15$, what is the value of $3 x ?$\nThe options are: (A)5 (B)10 (C)15 (D)35\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$f(x)=\\frac{x+3}{2}$$For the function $f$ defined above, what is the value of $f(-1)$ ?\nThe options are: (A)-2 (B)-1 (C)1 (D)2\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Which of the following is equivalent to $2 x\\left(x^{2}-3 x\\right)$ ?\nThe options are: (A)$-4 x^{2}$ (B)$3 x^{3}-x^{2}$ (C)$2 x^{3}-3 x$ (D)$2 x^{3}-6 x^{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "A retail company has 50 large stores located in different areas throughout a state. A researcher for the company believes that employee job satisfaction varies greatly from store to store. Which of the following sampling methods is most appropriate to estimate the proportion of all employees of the company who are satisfied with their job?\nThe options are: (A)Selecting one of the 50 stores at random and then surveying each employee at that store (B)Selecting 10 employees from each store at random and then surveying each employee selected (C)Surveying the 25 highest-paid employees and the 25 lowest-paid employees (D)Creating a website on which employees can express their opinions and then using the first 50 responses\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$h(x)=2^{x}$$The function $h$ is defined above. What is $h(5)-h(3) ?$\nThe options are: (A)2 (B)4 (C)24 (D)28\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "A researcher surveyed a random sample of students from a large university about how often they see movies. Using the sample data, the researcher estimated that $23 \\%$ of the students in the population saw a movie at least once per month. The margin of error for this estimation is $4 \\%$. Which of the following is the most appropriate conclusion about all students at the university, based on the given estimate and margin of error?\nThe options are: (A)It is unlikely that less than $23 \\%$ of the students see a movie at least once per month. (B)At least 23\\%, but no more than $25 \\%$, of the students see a movie at least once per month. (C)The researcher is between $19 \\%$ and $27 \\%$ sure that most students see a movie at least once per month. (D)It is plausible that the percentage of students who see a movie at least once per month is between $19 \\%$ and $27 \\%$.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "\\begin{center}\\begin{tabular}{|c|c|c|c|c|c|c|}\\hlineList A & 1 & 2 & 3 & 4 & 5 & 6 \\\\\\hlineList B & 2 & 3 & 3 & 4 & 4 & 5 \\\\\\hline\\end{tabular}\\end{center}The table above shows two lists of numbers. Which of the following is a true statement comparing list $\\mathrm{A}$ and list B ?\nThe options are: (A)The means are the same, and the standard deviations are different. (B)The means are the same, and the standard deviations are the same. (C)The means are different, and the standard deviations are different. (D)The means are different, and the standard deviations are the same.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "A book was on sale for $40 \\%$ off its original price. If the sale price of the book was $\\$ 18.00$, what was the original price of the book? (Assume there is no sales tax.)\nThe options are: (A)$\\$ 7.20$ (B)$\\$ 10.80$ (C)$\\$ 30.00$ (D)$\\$ 45.00$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "A right circular cone has a volume of $24 \\pi$ cubic inches. If the height of the cone is 2 inches, what is the radius, in inches, of the base of the cone?\nThe options are: (A)$2 \\sqrt{3}$ (B)6 (C)12 (D)36\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "In 2015 the populations of City $\\mathrm{X}$ and City $\\mathrm{Y}$ were equal. From 2010 to 2015, the population of City X increased by $20 \\%$ and the population of City $\\mathrm{Y}$ decreased by $10 \\%$. If the population of City $\\mathrm{X}$ was 120,000 in 2010, what was the population of City Y in 2010 ?\nThe options are: (A)60,000 (B)90,000 (C)160,000 (D)240,000\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "The volume of a sphere is given by the formula $V=\\frac{4}{3} \\pi r^{3}$, where $r$ is the radius of the sphere. Which of the following gives the radius of the sphere in terms of the volume of the sphere?\nThe options are: (A)$\\frac{4 \\pi}{3 V}$ (B)$\\frac{3 V}{4 \\pi}$ (C)$\\sqrt[3]{\\frac{4 \\pi}{3 V}}$ (D)$\\sqrt[3]{\\frac{3 V}{4 \\pi}}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Survey Results\\begin{center}\\begin{tabular}{|l|c|}\\hlineAnswer & Percent \\\\\\hlineNever & $31.3 \\%$ \\\\\\hlineRarely & $24.3 \\%$ \\\\\\hlineOften & $13.5 \\%$ \\\\\\hlineAlways & $30.9 \\%$ \\\\\\hline\\end{tabular}\\end{center}The table above shows the results of a survey in which tablet users were asked how often they would watch video advertisements in order to access streaming content for free. Based on the table, which of the following is closest to the probability that a tablet user answered \"Always,\" given that the tablet user did not answer \"Never\"?\nThe options are: (A)0.31 (B)0.38 (C)0.45 (D)0.69\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$y=-(x-3)^{2}+a$$In the equation above, $a$ is a constant. The graph of the equation in the $x y$-plane is a parabola. Which of the following is true about the parabola?\nThe options are: (A)Its minimum occurs at $(-3, a)$. (B)Its minimum occurs at $(3, a)$. (C)Its maximum occurs at $(-3, a)$. (D)Its maximum occurs at $(3, a)$.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "The maximum value of a data set consisting of 25 positive integers is 84 . A new data set consisting of 26 positive integers is created by including 96 in the original data set. Which of the following measures must be 12 greater for the new data set than for the original data set?\nThe options are: (A)The mean (B)The median (C)The range (D)The standard deviation\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$0.10 x+0.20 y=0.18(x+y)$$Clayton will mix $x$ milliliters of a $10 \\%$ by mass saline solution with $y$ milliliters of a $20 \\%$ by mass saline solution in order to create an $18 \\%$ by mass saline solution. The equation above represents this situation. If Clayton uses 100 milliliters of the $20 \\%$ by mass saline solution, how many milliliters of the $10 \\%$ by mass saline solution must he use?\nThe options are: (A)5 (B)25 (C)50 (D)100\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "The first year Eleanor organized a fund-raising event, she invited 30 people. For each of the next 5 years, she invited double the number of people she had invited the previous year. If $f(n)$ is the number of people invited to the fund-raiser $n$ years after Eleanor began organizing the event, which of the following statements best describes the function $f$ ?\nThe options are: (A)The function $f$ is a decreasing linear function. (B)The function $f$ is an increasing linear function. (C)The function $f$ is a decreasing exponential function. (D)The function $f$ is an increasing exponential function.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "\\begin{center}\\begin{tabular}{|c|c|c|c|}\\hline$x$ & $a$ & $3 a$ & $5 a$ \\\\\\hline$y$ & 0 & $-a$ & $-2 a$ \\\\\\hline\\end{tabular}\\end{center}Some values of $x$ and their corresponding values of $y$ are shown in the table above, where $a$ is a constant. If there is a linear relationship between $x$ and $y$, which of the following equations represents the relationship?\nThe options are: (A)$x+2 y=a$ (B)$x+2 y=5 a$ (C)$2 x-y=-5 a$ (D)$2 x-y=7 a$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$\\begin{aligned}& 2.4 x-1.5 y=0.3 \\\\& 1.6 x+0.5 y=-1.3\\end{aligned}$$The system of equations above is graphed in the $x y$-plane. What is the $x$-coordinate of the intersection point $(x, y)$ of the system?\nThe options are: (A)-0.5 (B)-0.25 (C)0.8 (D)1.75\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "Keith modeled the growth over several hundred years of a tree population by estimating the number of the trees' pollen grains per square centimeter that were deposited each year within layers of a lake's sediment. He estimated there were 310 pollen grains per square centimeter the first year the grains were deposited, with a $1 \\%$ annual increase in the number of grains per square centimeter thereafter. Which of the following functions models $P(t)$, the number of pollen grains per square centimeter $t$ years after the first year the grains were deposited?\nThe options are: (A)$P(t)=310^{t}$ (B)$P(t)=310^{1.01 t}$ (C)$P(t)=310(0.99)^{t}$ (D)$P(t)=310(1.01)^{t}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "$$\\frac{2}{3}(9 x-6)-4=9 x-6$$Based on the equation above, what is the value of $3 x-2$ ?\nThe options are: (A)-4 (B)$-\\frac{4}{5}$ (C)$-\\frac{2}{3}$ (D)4\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$H=1.88 L+32.01$$The formula above can be used to approximate the height $H$, in inches, of an adult male based on the length $L$, in inches, of his femur. What is the meaning of 1.88 in this context?\nThe options are: (A)The approximate femur length, in inches, for a man with a height of 32.01 inches (B)The approximate increase in a man's femur length, in inches, for each increase of 32.01 inches in his height (C)The approximate increase in a man's femur length, in inches, for each one-inch increase in his height (D)The approximate increase in a man's height, in inches, for each one-inch increase in his femur length\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "A painter will paint $n$ walls with the same size and shape in a building using a specific brand of paint. The painter's fee can be calculated by the expression $n K \\ell h$, where $n$ is the number of walls, $K$ is a constant with units of dollars per square foot, $\\ell$ is the length of each wall in feet, and $h$ is the height of each wall in feet. If the customer asks the painter to use a more expensive brand of paint, which of the factors in the expression would change?\nThe options are: (A)$h$ (B)$\\ell$ (C)$K$ (D)$n$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "If $3 r=18$, what is the value of $6 r+3$ ?\nThe options are: (A)6 (B)27 (C)36 (D)39\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Which of the following is equal to $a^{\\frac{2}{3}}$, for all values of $a$ ?\nThe options are: (A)$\\sqrt{a^{\\frac{1}{3}}}$ (B)$\\sqrt{a^{3}}$ (C)$\\sqrt[3]{a^{\\frac{1}{2}}}$ (D)$\\sqrt[3]{a^{2}}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "The number of states that joined the United States between 1776 and 1849 is twice the number of states that joined between 1850 and 1900. If 30 states joined the United States between 1776 and 1849 and $x$ states joined between 1850 and 1900 , which of the following equations is true?\nThe options are: (A)$30 x=2$ (B)$2 x=30$ (C)$\\frac{x}{2}=30$ (D)$x+30=2$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "If $\\frac{5}{x}=\\frac{15}{x+20}$, what is the value of $\\frac{x}{5} ?$\nThe options are: (A)10 (B)5 (C)2 (D)$\\frac{1}{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{aligned}& 2 x-3 y=-14 \\\\& 3 x-2 y=-6\\end{aligned}$$If $(x, y)$ is a solution to the system of equations above, what is the value of $x-y$ ?\nThe options are: (A)-20 (B)$\\quad-8$ (C)-4 (D)8\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "\\begin{center}\\begin{tabular}{|c|c|}\\hline$x$ & $f(x)$ \\\\\\hline0 & 3 \\\\\\hline2 & 1 \\\\\\hline4 & 0 \\\\\\hline5 & -2 \\\\\\hline\\end{tabular}\\end{center}The function $f$ is defined by a polynomial. Some values of $x$ and $f(x)$ are shown in the table above. Which of the following must be a factor of $f(x)$ ?\nThe options are: (A)$x-2$ (B)$x-3$ (C)$x-4$ (D)$x-5$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "The line $y=k x+4$, where $k$ is a constant, is graphed in the $x y$-plane. If the line contains the point $(c, d)$, where $c \\neq 0$ and $d \\neq 0$, what is the slope of the line in terms of $c$ and $d$ ?\nThe options are: (A)$\\frac{d-4}{c}$ (B)$\\frac{c-4}{d}$ (C)$\\frac{4-d}{c}$ (D)$\\frac{4-c}{d}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$\\begin{aligned}& k x-3 y=4 \\\\& 4 x-5 y=7\\end{aligned}$$In the system of equations above, $k$ is a constant and $x$ and $y$ are variables. For what value of $k$ will the system of equations have no solution?\nThe options are: (A)$\\frac{12}{5}$ (B)$\\frac{16}{7}$ (C)$-\\frac{16}{7}$ (D)$-\\frac{12}{5}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "In the $x y$-plane, the parabola with equation $y=(x-11)^{2}$ intersects the line with equation $y=25$ at two points, $A$ and $B$. What is the length of $\\overline{A B}$ ?\nThe options are: (A)10 (B)12 (C)14 (D)16\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$y=a(x-2)(x+4)$$In the quadratic equation above, $a$ is a nonzero constant. The graph of the equation in the $x y$-plane is a parabola with vertex $(c, d)$. Which of the following is equal to $d$ ?\nThe options are: (A)$-9 a$ (B)$-8 a$ (C)$-5 a$ (D)$-2 a$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "The equation $\\frac{24 x^{2}+25 x-47}{a x-2}=-8 x-3-\\frac{53}{a x-2}$ is true for all values of $x \\neq \\frac{2}{a}$, where $a$ is a constant.What is the value of $a$ ?\nThe options are: (A)-16 (B)-3 (C)3 (D)16\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "What are the solutions to $3 x^{2}+12 x+6=0 ?$\nThe options are: (A)$x=-2 \\pm \\sqrt{2}$ (B)$x=-2 \\pm \\frac{\\sqrt{30}}{3}$ (C)$x=-6 \\pm \\sqrt{2}$ (D)$x=-6 \\pm 6 \\sqrt{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$C=\\frac{5}{9}(F-32)$$The equation above shows how a temperature $F$, measured in degrees Fahrenheit, relates to a temperature $C$, measured in degrees Celsius. Based on the equation, which of the following must be true?I. A temperature increase of 1 degree Fahrenheit is equivalent to a temperature increase of $\\frac{5}{9}$ degree Celsius.II. A temperature increase of 1 degree Celsius is equivalent to a temperature increase of 1.8 degrees Fahrenheit.III. A temperature increase of $\\frac{5}{9}$ degree Fahrenheit is equivalent to a temperature increase of 1 degree Celsius.\nThe options are: (A)I only (B)II only (C)III only (D)I and II only\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "\\begin{center}\\begin{tabular}{|l||c|c||c|}\\cline { 2 - 4 }\\multicolumn{1}{c||}{} & \\multicolumn{2}{c||}{Age} & \\multirow{2}{c|}{Total} \\\\\\hlineGender & Under 40 & 40 or older \\\\\\hline\\hlineMale & 12 & 2 & 14 \\\\\\hlineFemale & 8 & 3 & 11 \\\\\\hline\\hlineTotal & 20 & 5 & 25 \\\\\\hline\\end{tabular}\\end{center}The table above shows the distribution of age and gender for 25 people who entered a contest. If the contest winner will be selected at random, what is the probability that the winner will be either a female under age 40 or a male age 40 or older?\nThe options are: (A)$\\frac{4}{25}$ (B)$\\frac{10}{25}$ (C)$\\frac{11}{25}$ (D)$\\frac{16}{25}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "\\begin{center}\\begin{tabular}{|c||c|c|c|c|}\\hline$n$ & 1 & 2 & 3 & 4 \\\\\\hline$f(n)$ & -2 & 1 & 4 & 7 \\\\\\hline\\end{tabular}\\end{center}The table above shows some values of the linear function $f$. Which of the following defines $f$ ?\nThe options are: (A)$f(n)=n-3$ (B)$f(n)=2 n-4$ (C)$f(n)=3 n-5$ (D)$f(n)=4 n-6$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "At Lincoln High School, approximately 7 percent of enrolled juniors and 5 percent of enrolled seniors were inducted into the National Honor Society last year. If there were 562 juniors and 602 seniors enrolled at Lincoln High School last year, which of the following is closest to the total number of juniors and seniors at Lincoln High School last year who were inducted into the National Honor Society?\nThe options are: (A)140 (B)69 (C)39 (D)30\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\begin{aligned}& 3 x^{2}-5 x+2 \\\\& 5 x^{2}-2 x-6\\end{aligned}$$Which of the following is the sum of the two polynomials shown above?\nThe options are: (A)$8 x^{2}-7 x-4$ (B)$8 x^{2}+7 x-4$ (C)$8 x^{4}-7 x^{2}-4$ (D)$8 x^{4}+7 x^{2}-4$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "If $\\frac{3}{5} w=\\frac{4}{3}$, what is the value of $w ?$\nThe options are: (A)$\\frac{9}{20}$ (B)$\\frac{4}{5}$ (C)$\\frac{5}{4}$ (D)$\\frac{20}{9}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "The average number of students per classroom at Central High School from 2000 to 2010 can be modeled by the equation $y=0.56 x+27.2$, where $x$ represents the number of years since 2000 , and $y$ represents the average number of students per classroom. Which of the following best describes the meaning of the number 0.56 in the equation?\nThe options are: (A)The total number of students at the school in 2000 (B)The average number of students per classroom in 2000 (C)The estimated increase in the average number of students per classroom each year (D)The estimated difference between the average number of students per classroom in 2010 and in 2000\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Nate walks 25 meters in 13.7 seconds. If he walks at this same rate, which of the following is closest to the distance he will walk in 4 minutes?\nThe options are: (A)150 meters (B)450 meters (C)700 meters (D)1,400 meters\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "\\begin{center}.\\begin{tabular}{|l|c|}.\\hline.\\multicolumn{1}{|c|}{Planet} & Acceleration due to gravity $\\left(\\frac{\\mathrm{m}}{\\mathrm{sec}^{2}}\\right)$ \\\\.\\hline\\hline.Mercury & 3.6 \\\\.\\hline.Venus & 8.9 \\\\.\\hline.Earth & 9.8 \\\\.\\hline.Mars & 3.8 \\\\.\\hline.Jupiter & 26.0 \\\\.\\hline.Saturn & 11.1 \\\\.\\hline.Uranus & 10.7 \\\\.\\hline.Neptune & 14.1 \\\\.\\hline.\\end{tabular}.\\end{center}.The chart above shows approximations of the acceleration due to gravity in meters per.second squared $\\left(\\frac{\\mathrm{m}}{\\sec ^{2}}\\right)$ for the eight planets in our solar system. The weight of an object on a given planet can be found by using the formula $W=m g$, where $W$ is the weight of the object measured in newtons, $m$ is the mass of the object measured in kilograms, and $g$ is the acceleration due to gravity on the planet measured in $\\frac{m}{\\sec ^{2}}$\n\nWhat is the weight, in newtons, of an object on Mercury with a mass of 90 kilograms?\nThe options are: (A)25 (B)86 (C)101 (D)324\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "\\begin{center}.\\begin{tabular}{|l|c|}.\\hline.\\multicolumn{1}{|c|}{Planet} & Acceleration due to gravity $\\left(\\frac{\\mathrm{m}}{\\mathrm{sec}^{2}}\\right)$ \\\\.\\hline\\hline.Mercury & 3.6 \\\\.\\hline.Venus & 8.9 \\\\.\\hline.Earth & 9.8 \\\\.\\hline.Mars & 3.8 \\\\.\\hline.Jupiter & 26.0 \\\\.\\hline.Saturn & 11.1 \\\\.\\hline.Uranus & 10.7 \\\\.\\hline.Neptune & 14.1 \\\\.\\hline.\\end{tabular}.\\end{center}.The chart above shows approximations of the acceleration due to gravity in meters per.second squared $\\left(\\frac{\\mathrm{m}}{\\sec ^{2}}\\right)$ for the eight planets in our solar system. The weight of an object on a given planet can be found by using the formula $W=m g$, where $W$ is the weight of the object measured in newtons, $m$ is the mass of the object measured in kilograms, and $g$ is the acceleration due to gravity on the planet measured in $\\frac{m}{\\sec ^{2}}$\n\nAn object on Earth has a weight of 150 newtons. On which planet would the same object have an approximate weight of 170 newtons?\nThe options are: (A)Venus (B)Saturn (C)Uranus (D)Neptune\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$h=-16 t^{2}+v t+k$$The equation above gives the height $h$, in feet, of a ball $t$ seconds after it is thrown straight up with an initial speed of $v$ feet per second from a height of $k$ feet. Which of the following gives $v$ in terms of $h, t$, and $k$ ?\nThe options are: (A)$v=h+k-16 t$ (B)$v=\\frac{h-k+16}{t}$ (C)$v=\\frac{h+k}{t}-16 t$ (D)$v=\\frac{h-k}{t}+16 t$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "In order to determine if treatment $\\mathrm{X}$ is successful in improving eyesight, a research study was conducted. From a large population of people with poor eyesight, 300 participants were selected at random. Half of the participants were randomly assigned to receive treatment $X$, and the other half did not receive treatment $X$. The resulting data showed that participants who received treatment $X$ had significantly improved eyesight as compared to those who did not receive treatment $X$. Based on the design and results of the study, which of the following is an appropriate conclusion?\nThe options are: (A)Treatment $\\mathrm{X}$ is likely to improve the eyesight of people who have poor eyesight. (B)Treatment $\\mathrm{X}$ improves eyesight better than all other available treatments. (C)Treatment $X$ will improve the eyesight of anyone who takes it. (D)Treatment $\\mathrm{X}$ will cause a substantial improvement in eyesight.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$.\\begin{aligned}.& S(P)=\\frac{1}{2} P+40 \\\\.& D(P)=220-P.\\end{aligned}.$$.The quantity of a product supplied and the quantity of the product demanded in an economic market are functions of the price of the product. The functions above are the estimated supply and demand functions for a certain product. The function $S(P)$ gives the quantity of the product supplied to the market when the price is $P$ dollars, and the function $D(P)$ gives the quantity of the product demanded by the market when the price is $P$ dollars.\n\nHow will the quantity of the product supplied to the market change if the price of the product is increased by $\\$ 10$ ?\nThe options are: (A)The quantity supplied will decrease by 5 units. (B)The quantity supplied will increase by 5 units. (C)The quantity supplied will increase by 10 units. (D)The quantity supplied will increase by 50 units.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$.\\begin{aligned}.& S(P)=\\frac{1}{2} P+40 \\\\.& D(P)=220-P.\\end{aligned}.$$.The quantity of a product supplied and the quantity of the product demanded in an economic market are functions of the price of the product. The functions above are the estimated supply and demand functions for a certain product. The function $S(P)$ gives the quantity of the product supplied to the market when the price is $P$ dollars, and the function $D(P)$ gives the quantity of the product demanded by the market when the price is $P$ dollars.\n\nAt what price will the quantity of the product supplied to the market equal the quantity of the product demanded by the market?\nThe options are: (A)$\\$ 90$ (B)$\\$ 120$ (C)$\\$ 133$ (D)$\\$ 155$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$.\\begin{aligned}.& S(P)=\\frac{1}{2} P+40 \\\\.& D(P)=220-P.\\end{aligned}.$$.The quantity of a product supplied and the quantity of the product demanded in an economic market are functions of the price of the product. The functions above are the estimated supply and demand functions for a certain product. The function $S(P)$ gives the quantity of the product supplied to the market when the price is $P$ dollars, and the function $D(P)$ gives the quantity of the product demanded by the market when the price is $P$ dollars.\n\nGraphene, which is used in the manufacture of integrated circuits, is so thin that a sheet weighing one ounce can cover up to 7 football fields. If a football field has an area of approximately $1 \\frac{1}{3}$ acres, about how many acres could 48 ounces of graphene cover?\nThe options are: (A)250 (B)350 (C)450 (D)1,350\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Of the following four types of savings account plans, which option would yield exponential growth of the money in the account?\nThe options are: (A)Each successive year, $2 \\%$ of the initial savings is added to the value of the account. (B)Each successive year, $1.5 \\%$ of the initial savings and $\\$ 100$ is added to the value of the account. (C)Each successive year, $1 \\%$ of the current value is added to the value of the account. (D)Each successive year, $\\$ 100$ is added to the value of the account.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "The sum of three numbers is 855 . One of the numbers, $x$, is $50 \\%$ more than the sum of the other two numbers. What is the value of $x$ ?\nThe options are: (A)570 (B)513 (C)214 (D)155\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Mr. Kohl has a beaker containing $n$ milliliters of solution to distribute to the students in his chemistry class. If he gives each student 3 milliliters of solution, he will have 5 milliliters left over. In order to give each student 4 milliliters of solution, he will need an additional 21 milliliters. How many students are in the class?\nThe options are: (A)16 (B)21 (C)23 (D)26\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "In the $x y$-plane, the line determined by the points $(2, k)$ and $(k, 32)$ passes through the origin. Which of the following could be the value of $k$ ?\nThe options are: (A)0 (B)4 (C)8 (D)16\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "A rectangle was altered by increasing its length by 10 percent and decreasing its width by $p$ percent. If these alterations decreased the area of the rectangle by 12 percent, what is the value of $p$ ?\nThe options are: (A)12 (B)15 (C)20 (D)22\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "In planning maintenance for a city's infrastructure, a civil engineer estimates that, starting from the present, the population of the city will decrease by 10 percent every 20 years. If the present population of the city is 50,000, which of the following expressions represents the engineer's estimate of the population of the city $t$ years from now?\nThe options are: (A)$50,000(0.1)^{20 t}$ (B)$50,000(0.1)^{\\frac{t}{20}}$ (C)$50,000(0.9)^{20 t}$ (D)$50,000(0.9)^{\\frac{t}{20}}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "\\begin{center}\\begin{tabular}{|l|c|c|}\\cline { 2 - 3 }\\multicolumn{1}{c|}{} & \\multicolumn{2}{c|}{Handedness} \\\\\\hlineGender & Left & Right \\\\\\hline\\hlineFemale & & \\\\\\hlineMale & & \\\\\\hline\\hlineTotal & 18 & 122 \\\\\\hline\\end{tabular}\\end{center}The incomplete table above summarizes the number of left-handed students and right-handed students by gender for the eighth-grade students atKeisel Middle School. There are 5 times as many right-handed female students as there are left-handed female students, and there are 9 times as many right-handed male students as there are left-handed male students. If there is a total of 18 left-handed students and 122 right-handed students in the school, which of the following is closest to the probability that a right-handed student selected at random is female? (Note: Assume that none of the eighth-grade students are both right-handed and left-handed.)\nThe options are: (A)0.410 (B)0.357 (C)0.333 (D)0.250\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$\\begin{aligned}& 3 x+b=5 x-7 \\\\& 3 y+c=5 y-7\\end{aligned}$$In the equations above, $b$ and $c$ are constants.If $b$ is $c$ minus $\\frac{1}{2}$, which of the following is true?\nThe options are: (A)$x$ is $y$ minus $\\frac{1}{4}$. (B)$x$ is $y$ minus $\\frac{1}{2}$. (C)$x$ is $y$ minus 1 . (D)$x$ is $y$ plus $\\frac{1}{2}$.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "What are the solutions of the quadratic equation $4 x^{2}-8 x-12=0$ ?\nThe options are: (A)$x=-1$ and $x=-3$ (B)$x=-1$ and $x=3$ (C)$x=1$ and $x=-3$ (D)$x=1$ and $x=3$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\sqrt{k+2}-x=0$$In the equation above, $k$ is a constant. If $x=9$, what is the value of $k$ ?\nThe options are: (A)1 (B)7 (C)16 (D)79\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Which of the following is equivalent to the sum of the expressions $a^{2}-1$ and $a+1$ ?\nThe options are: (A)$a^{2}+a$ (B)$a^{3}-1$ (C)$2 a^{2}$ (D)$a^{3}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "In air, the speed of sound $S$, in meters per second, is a linear function of the air temperature $T$, in degrees Celsius, and is given by $S(T)=0.6 T+331.4$. Which of the following statements is the best interpretation of the number 331.4 in this context?\nThe options are: (A)The speed of sound, in meters per second, at $0^{\\circ} \\mathrm{C}$ (B)The speed of sound, in meters per second, at $0.6^{\\circ} \\mathrm{C}$ (C)The increase in the speed of sound, in meters per second, that corresponds to an increase of $1^{\\circ} \\mathrm{C}$ (D)The increase in the speed of sound, in meters per second, that corresponds to an increase of $0.6^{\\circ} \\mathrm{C}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$\\begin{aligned}y & =x^{2} \\\\2 y+6 & =2(x+3)\\end{aligned}$$If $(x, y)$ is a solution of the system of equations above and $x>0$, what is the value of $x y$ ?\nThe options are: (A)1 (B)2 (C)3 (D)9\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "If $a^{2}+b^{2}=z$ and $a b=y$, which of the following is equivalent to $4 z+8 y$ ?\nThe options are: (A)$(a+2 b)^{2}$ (B)$(2 a+2 b)^{2}$ (C)$(4 a+4 b)^{2}$ (D)$(4 a+8 b)^{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "The volume of right circular cylinder A is 22 cubic centimeters. What is the volume, in cubic centimeters, of a right circular cylinder with twice the radius and half the height of cylinder A?\nThe options are: (A)11 (B)22 (C)44 (D)66\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Which of the following is equivalent to $9^{\\frac{3}{4}}$ ?\nThe options are: (A)$\\sqrt[3]{9}$ (B)$\\sqrt[4]{9}$ (C)$\\sqrt{3}$ (D)$3 \\sqrt{3}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "At a restaurant, $n$ cups of tea are made by adding $t$ tea bags to hot water. If $t=n+2$, how many additional tea bags are needed to make each additional cup of tea?\nThe options are: (A)None (B)One (C)Two (D)Three\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Alan drives an average of 100 miles each week. His car can travel an average of 25 miles per gallon of gasoline. Alan would like to reduce his weekly expenditure on gasoline by $\\$ 5$. Assuming gasoline costs $\\$ 4$ per gallon, which equation can Alan use to determine how many fewer average miles, $m$, he should drive each week?\nThe options are: (A)$\\frac{25}{4} m=95$ (B)$\\frac{25}{4} m=5$ (C)$\\frac{4}{25} m=95$ (D)$\\frac{4}{25} m=5$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "\\begin{center}\\begin{tabular}{|c|c|}\\hline$x$ & $f(x)$ \\\\\\hline1 & 5 \\\\\\hline3 & 13 \\\\\\hline5 & 21 \\\\\\hline\\end{tabular}\\end{center}Some values of the linear function $f$ are shown in the table above. Which of the following defines $f$ ?\nThe options are: (A)$f(x)=2 x+3$ (B)$f(x)=3 x+2$ (C)$f(x)=4 x+1$ (D)$f(x)=5 x$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "To make a bakery's signature chocolate muffins, a baker needs 2.5 ounces of chocolate for each muffin. How many pounds of chocolate are needed to make 48 signature chocolate muffins?( 1 pound $=16$ ounces)\nThe options are: (A)7.5 (B)10 (C)50.5 (D)120\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "If $3(c+d)=5$, what is the value of $c+d ?$\nThe options are: (A)$\\frac{3}{5}$ (B)$\\frac{5}{3}$ (C)3 (D)5\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "The weight of an object on Venus is approximately $\\frac{9}{10}$ of its weight on Earth. The weight of an object on Jupiter is approximately $\\frac{23}{10}$ of its weight on Earth. If an object weighs 100 pounds on Earth, approximately how many more pounds does it weigh on Jupiter than it weighs on Venus?\nThe options are: (A)90 (B)111 (C)140 (D)230\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "An online bookstore sells novels and magazines. Each novel sells for $\\$ 4$, and each magazine sells for $\\$ 1$. If Sadie purchased a total of 11 novels and magazines that have a combined selling price of $\\$ 20$, how many novels did she purchase?\nThe options are: (A)2 (B)3 (C)4 (D)5\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "The Downtown Business Association (DBA) in a certain city plans to increase its membership by a total of $n$ businesses per year. There were $b$ businesses in the DBA at the beginning of this year. Which function best models the total number of businesses, $y$, the DBA plans to have as members $x$ years from now?\nThe options are: (A)$y=n x+b$ (B)$y=n x-b$ (C)$y=b(n)^{x}$ (D)$y=n(b)^{x}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "Which of the following is an equivalent form of $(1.5 x-2.4)^{2}-\\left(5.2 x^{2}-6.4\\right) ?$\nThe options are: (A)$-2.2 x^{2}+1.6$ (B)$-2.2 x^{2}+11.2$ (C)$-2.95 x^{2}-7.2 x+12.16$ (D)$-2.95 x^{2}-7.2 x+0.64$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "The density $d$ of an object is found by dividing the mass $m$ of the object by its volume $V$. Which of the following equations gives the mass $m$ in terms of $d$ and $V$ ?\nThe options are: (A)$m=d V$ (B)$m=\\frac{d}{V}$ (C)$m=\\frac{V}{d}$ (D)$m=V+d$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$-2 x+3 y=6$$In the $x y$-plane, the graph of which of the following equations is perpendicular to the graph of the equation above?\nThe options are: (A)$3 x+2 y=6$ (B)$3 x+4 y=6$ (C)$2 x+4 y=6$ (D)$2 x+6 y=3$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$\\begin{array}{r}\\frac{1}{2} y=4 \\\\x-\\frac{1}{2} y=2\\end{array}$$The system of equations above has solution $(x, y)$. What is the value of $x$ ?\nThe options are: (A)3 (B)$\\frac{7}{2}$ (C)4 (D)6\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "$$\\begin{gathered}y \\leq 3 x+1 \\\\x-y>1\\end{gathered}$$Which of the following ordered pairs $(x, y)$ satisfies the system of inequalities above?\nThe options are: (A)$(-2,-1)$ (B)$(-1,3)$ (C)$(1,5)$ (D)$(2,-1)$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "\\begin{center}\\begin{tabular}{|l|c|c|c|}\\hline\\multirow{2}{*}{$\\begin{array}{c}\\text { Type of } \\\\\\text { surgeon }\\end{array}$} & \\multicolumn{2}{|c|}{$\\begin{array}{c}\\text { Major professional } \\\\\\text { activity }\\end{array}$} & \\multirow{2}{*}{Total} \\\\\\cline { 2 - 3 }& Teaching & Research \\\\\\hlineGeneral & 258 & 156 & 414 \\\\\\hlineOrthopedic & 119 & 74 & 193 \\\\\\hlineTotal & 377 & 230 & 607 \\\\\\hline\\end{tabular}\\end{center}In a survey, 607 general surgeons and orthopedic surgeons indicated their major professional activity. The results are summarized in the table above. If one of the surgeons is selected at random, which of the following is closest to the probability that the selected surgeon is an orthopedic surgeon whose indicated professional activity is research?\nThe options are: (A)0.122 (B)0.196 (C)0.318 (D)0.379\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "A polling agency recently surveyed 1,000 adults who were selected at random from a large city and asked each of the adults, \"Are you satisfied with the quality of air in the city?\" Of those surveyed, 78 percent responded that they were satisfied with the quality of air in the city. Based on the results of the survey, which of the following statements must be true?I. Of all adults in the city, 78 percent are satisfied with the quality of air in the city.II. If another 1,000 adults selected at random from the city were surveyed, 78 percent of them would report they are satisfied with the quality of air in the city.III. If 1,000 adults selected at random from a different city were surveyed, 78 percent of them would report they are satisfied with the quality of air in the city.\nThe options are: (A)None (B)II only (C)I and II only (D)I and III only\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "\\begin{center}.\\begin{tabular}{|l|c|}.\\hline.\\multicolumn{1}{|c|}{Species of tree} & Growth factor \\\\.\\hline.Red maple & 4.5 \\\\.\\hline.River birch & 3.5 \\\\.\\hline.Cottonwood & 2.0 \\\\.\\hline.Black walnut & 4.5 \\\\.\\hline.White birch & 5.0 \\\\.\\hline.American elm & 4.0 \\\\.\\hline.Pin oak & 3.0 \\\\.\\hline.Shagbark hickory & 7.5 \\\\.\\hline.\\end{tabular}.\\end{center}.One method of calculating the approximate age, in years, of a tree of a particular species is to multiply the diameter of the tree, in inches, by a constant called the growth factor for that species. The table above gives the growth factors for eight species of trees.\n\nAccording to the information in the table, what is the approximate age of an American elm tree with a diameter of 12 inches?\nThe options are: (A)24 years (B)36 years (C)40 years (D)48 years\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "If a white birch tree and a pin oak tree each now have a diameter of 1 foot, which of the following will be closest to the difference, in inches, of their diameters 10 years from now? $(1$ foot $=12$ inches $)$\nThe options are: (A)1.0 (B)1.2 (C)1.3 (D)1.4\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\frac{a-b}{a}=c$$In the equation above, if $a$ is negative and $b$ is positive, which of the following must be true?\nThe options are: (A)$c>1$ (B)$c=1$ (C)$c=-1$ (D)$c<-1$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "In State X, Mr. Camp's eighth-grade class consisting of 26 students was surveyed and 34.6 percent of the students reported that they had at least two siblings. The average eighth-grade class size in the state is 26. If the students in Mr. Camp's class are representative of students in the state's eighth-grade classes and there are 1,800 eighth-grade classes in the state, which of the following best estimates the number of eighth-grade students in the state who have fewer than two siblings?\nThe options are: (A)16,200 (B)23,400 (C)30,600 (D)46,800 Questions 23 and 24 refer to the following information.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "\\begin{center}\\begin{tabular}{|l|c|c|}\\hline\\multicolumn{3}{|c|}{Townsend Realty Group Investments} \\\\\\hlineProperty address & $\\begin{array}{c}\\text { Purchase price } \\\\ \\text { (dollars) }\\end{array}$ & $\\begin{array}{c}\\text { Monthly rental } \\\\ \\text { price } \\\\ \\text { (dollars) }\\end{array}$ \\\\\\hlineClearwater Lane & 128,000 & 950 \\\\\\hlineDriftwood Drive & 176,000 & 1,310 \\\\\\hlineEdgemont Street & 70,000 & 515 \\\\\\hlineGlenview Street & 140,000 & 1,040 \\\\\\hlineHamilton Circle & 450,000 & 3,365 \\\\\\hline\\end{tabular}\\end{center}The Townsend Realty Group invested in the five different properties listed in the table above. The table shows the amount, in dollars, the company paid for each property and the corresponding monthly rental price, in dollars, the company charges for the property at each of the five locations. 23The relationship between the monthly rental price $r$, in dollars, and the property's purchase price $p$, in thousands of dollars, can be represented by a linear function. Which of the following functions represents the relationship?\nThe options are: (A)$r(p)=2.5 p-870$ (B)$r(p)=5 p+165$ (C)$r(p)=6.5 p+440$ (D)$r(p)=7.5 p-10$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Townsend Realty purchased the Glenview Street property and received a $40 \\%$ discount off the original price along with an additional $20 \\%$ off the discounted price for purchasing the property in cash. Which of the following best approximates the original price, in dollars, of the Glenview Street property?\nThe options are: (A)$\\$ 350,000$ (B)$\\$ 291,700$ (C)$\\$ 233,300$ (D)$\\$ 175,000$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "A psychologist set up an experiment to study the tendency of a person to select the first item when presented with a series of items. In the experiment, 300 people were presented with a set of five pictures arranged in random order. Each person was asked to choose the most appealing picture. Of the first 150 participants, 36 chose the first picture in the set. Among the remaining 150 participants, $p$ people chose the first picture in the set. If more than $20 \\%$ of all participants chose the first picture in the set, which of the following inequalities best describes the possible values of $p$ ?\nThe options are: (A)$p>0.20(300-36)$, where $p \\leq 150$ (B)$p>0.20(300+36)$, where $p \\leq 150$ (C)$p-36>0.20(300)$, where $p \\leq 150$ (D)$p+36>0.20(300)$, where $p \\leq 150$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "The surface area of a cube is $6\\left(\\frac{a}{4}\\right)^{2}$, where $a$ is a positive constant. Which of the following gives the perimeter of one face of the cube?\nThe options are: (A)$\\frac{a}{4}$ (B)$a$ (C)$4 a$ (D)$6 a$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "The mean score of 8 players in a basketball game was 14.5 points. If the highest individual score is removed, the mean score of the remaining 7 players becomes 12 points. What was the highest score?\nThe options are: (A)20 (B)24 (C)32 (D)36\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$x^{2}+20 x+y^{2}+16 y=-20$$The equation above defines a circle in the $x y$-plane. What are the coordinates of the center of the circle?\nThe options are: (A)$(-20,-16)$ (B)$(-10,-8)$ (C)$(10,8)$ (D)$(20,16)$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$y=x^{2}-a$$In the equation above, $a$ is a positive constant and the graph of the equation in the $x y$-plane is a parabola. Which of the following is an equivalent form of the equation?\nThe options are: (A)$y=(x+a)(x-a)$ (B)$y=(x+\\sqrt{a})(x-\\sqrt{a})$ (C)$y=\\left(x+\\frac{a}{2}\\right)\\left(x-\\frac{a}{2}\\right)$ (D)$y=(x+a)^{2}$ DIRECTIONS\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$x+y=75$$The equation above relates the number of minutes, $x$, Maria spends running each day and the number of minutes, $y$, she spends biking each day. In the equation, what does the number 75 represent?\nThe options are: (A)The number of minutes spent running each day (B)The number of minutes spent biking each day (C)The total number of minutes spent running and biking each day (D)The number of minutes spent biking for each minute spent running\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Which of the following is equivalent to $3(x+5)-6$ ?\nThe options are: (A)$3 x-3$ (B)$3 x-1$ (C)$3 x+9$ (D)$15 x-6$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{aligned}& x=y-3 \\\\& \\frac{x}{2}+2 y=6\\end{aligned}$$Which ordered pair $(x, y)$ satisfies the system of equations shown above?\nThe options are: (A)$(-3,0)$ (B)$(0,3)$ (C)$(6,-3)$ (D)$(36,-6)$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Which of the following complex numbers is equal to $(5+12 i)-\\left(9 i^{2}-6 i\\right)$, for $i=\\sqrt{-1}$ ?\nThe options are: (A)$-14-18 i$ (B)$-4-6 i$ (C)$4+6 i$ (D)$14+18 i$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "If $f(x)=\\frac{x^{2}-6 x+3}{x-1}$, what is $f(-1)$ ?\nThe options are: (A)-5 (B)-2 (C)2 (D)5\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "A company that makes wildlife videos purchases camera equipment for $\\$ 32,400$. The equipment depreciates in value at a constant rate for 12 years, after which it is considered to have no monetary value. How much is the camera equipment worth 4 years after it is purchased?\nThe options are: (A)$\\$ 10,800$ (B)$\\$ 16,200$ (C)$\\$ 21,600$ (D)$\\$ 29,700$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$x^{2}+6 x+4$$Which of the following is equivalent to the expression above?\nThe options are: (A)$(x+3)^{2}+5$ (B)$(x+3)^{2}-5$ (C)$(x-3)^{2}+5$ (D)$(x-3)^{2}-5$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Ken is working this summer as part of a crew on a farm. He earned $\\$ 8$ per hour for the first 10 hours he worked this week. Because of his performance, his crew leader raised his salary to $\\$ 10$ per hour for the rest of the week. Ken saves $90 \\%$ of his earnings from each week. What is the least number of hours he must work the rest of the week to save at least $\\$ 270$ for the week?\nThe options are: (A)38 (B)33 (C)22 (D)16\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Marisa needs to hire at least 10 staff members for an upcoming project. The staff members will be made up of junior directors, who will be paid $\\$ 640$ per week, and senior directors, who will be paid $\\$ 880$ per week. Her budget for paying the staff members is no more than $\\$ 9,700$ per week. She must hire at least 3 junior directors and at least 1 senior director. Which of the following systems of inequalities represents the conditions described if $x$ is the number of junior directors and $y$ is the number of senior directors?\nThe options are: (A)$640 x+880 y \\geq 9,700$ $x+y \\leq 10$ $x \\geq 3$ $y \\geq 1$ (B)$640 x+880 y \\leq 9,700$ $x+y \\geq 10$ $x \\geq 3$ $y \\geq 1$ (C)$640 x+880 y \\geq 9,700$ $x+y \\geq 10$ $x \\leq 3$ $y \\leq 1$ (D)$640 x+880 y \\leq 9,700$ $x+y \\leq 10$ $x \\leq 3$ $y \\leq 1$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$a x^{3}+b x^{2}+c x+d=0$$In the equation above, $a, b, c$, and $d$ are constants. If the equation has roots $-1,-3$, and 5 , which of the following is a factor of $a x^{3}+b x^{2}+c x+d$ ?\nThe options are: (A)$x-1$ (B)$x+1$ (C)$x-3$ (D)$x+5$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "The function $f$ is defined by $f(x)=(x+3)(x+1)$. The graph of $f$ in the $x y$-plane is a parabola. Which of the following intervals contains the $x$-coordinate of the vertex of the graph of $f$ ?\nThe options are: (A)$-42 x-1 \\\\2 x & >5\\end{aligned}$$Which of the following consists of the $y$-coordinates of all the points that satisfy the system of inequalities above?\nThe options are: (A)$y>6$ (B)$y>4$ (C)$y>\\frac{5}{2}$ (D)$y>\\frac{3}{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\sqrt{2 x+6}+4=x+3$$What is the solution set of the equation above?\nThe options are: (A)$\\{-1\\}$ (B)$\\{5\\}$ (C)$\\{-1,5\\}$ (D)$\\{0,-1,5\\}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\begin{aligned}& f(x)=x^{3}-9 x \\\\& g(x)=x^{2}-2 x-3\\end{aligned}$$Which of the following expressions is equivalent to$\\frac{f(x)}{g(x)}$, for $x>3 ?$\nThe options are: (A)$\\frac{1}{x+1}$ (B)$\\frac{x+3}{x+1}$ (C)$\\frac{x(x-3)}{x+1}$ (D)$\\frac{x(x+3)}{x+1}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "A group of 202 people went on an overnight camping trip, taking 60 tents with them. Some of the tents held 2 people each, and the rest held 4 people each. Assuming all the tents were filled to capacity and every person got to sleep in a tent, exactly how many of the tents were 2-person tents?\nThe options are: (A)30 (B)20 (C)19 (D)18 11\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "If $\\frac{2 a}{b}=\\frac{1}{2}$, what is the value of $\\frac{b}{a} ?$\nThe options are: (A)$\\frac{1}{8}$ (B)$\\frac{1}{4}$ (C)2 (D)4\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Oil and gas production in a certain area dropped from 4 million barrels in 2000 to 1.9 million barrels in 2013. Assuming that the oil and gas production decreased at a constant rate, which of the following linear functions $f$ best models the production, in millions of barrels, $t$ years after the year 2000 ?\nThe options are: (A)$f(t)=\\frac{21}{130} t+4$ (B)$f(t)=\\frac{19}{130} t+4$ (C)$f(t)=-\\frac{21}{130} t+4$ (D)$f(t)=-\\frac{19}{130} t+4$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{aligned}& y=x^{2}+3 x-7 \\\\& y-5 x+8=0\\end{aligned}$$How many solutions are there to the system of equations above?\nThe options are: (A)There are exactly 4 solutions. (B)There are exactly 2 solutions. (C)There is exactly 1 solution. (D)There are no solutions.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{aligned}& g(x)=2 x-1 \\\\& h(x)=1-g(x)\\end{aligned}$$The functions $g$ and $h$ are defined above. What is the value of $h(0)$ ?\nThe options are: (A)-2 (B)0 (C)1 (D)2\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "One pound of grapes costs $\\$ 2$. At this rate, how many dollars will $c$ pounds of grapes cost?\nThe options are: (A)$2 c$ (B)$2+c$ (C)$\\frac{2}{c}$ (D)$\\frac{c}{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "In a random sample of 200 cars of a particular model, 3 have a manufacturing defect. At this rate, how many of 10,000 cars of the same model will have a manufacturing defect?\nThe options are: (A)150 (B)200 (C)250 (D)300\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "Two types of tickets were sold for a concert held at an amphitheater. Tickets to sit on a bench during the concert cost $\\$ 75$ each, and tickets to sit on the lawn during the concert cost $\\$ 40$ each. Organizers of the concert announced that 350 tickets had been sold and that $\\$ 19,250$ had been raised through ticket sales alone. Which of the following systems of equations could be used to find the number of tickets for bench seats, $B$, and the number of tickets for lawn seats, $L$, that were sold for the concert?\nThe options are: (A)$(75 B)(40 L)=1,950$ $B+L=350$ (B)$40 B+75 L=19,250$ $B+L=350$ (C)$75 B+40 L=350$ $B+L=19,250$ (D)$75 B+40 L=19,250$ $B+L=350$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "In the $x y$-plane, the graph of which of the following equations is a line with a slope of 3 ?\nThe options are: (A)$y=\\frac{1}{3} x$ (B)$y=x-3$ (C)$y=3 x+2$ (D)$y=6 x+3$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$x+1=\\frac{2}{x+1}$$In the equation above, which of the following is a possible value of $x+1$ ?\nThe options are: (A)$1-\\sqrt{2}$ (B)$\\sqrt{2}$ (C)2 (D)4\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Roberto is an insurance agent who sells two types of policies: a $\\$ 50,000$ policy and a $\\$ 100,000$ policy. Last month, his goal was to sell at least 57 insurance policies. While he did not meet his goal, the total value of the policies he sold was over $\\$ 3,000,000$. Which of the following systems of inequalities describes $x$, the possible number of $\\$ 50,000$ policies, and $y$, the possible number of $\\$ 100,000$ policies, that Roberto sold last month?\nThe options are: (A)$x+y<57$ $50,000 x+100,000 y<3,000,000$ (B)$x+y>57$ $50,000 x+100,000 y>3,000,000$ (C)$x+y<57$ $50,000 x+100,000 y>3,000,000$ (D)$x+y>57$ $50,000 x+100,000 y<3,000,000$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\begin{aligned}& 2 x-y=8 \\\\& x+2 y=4\\end{aligned}$$For the system of equations above, what is the value of $x+y$ ?\nThe options are: (A)-1 (B)4 (C)5 (D)20\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Which of the following is equivalent to $2\\left(x^{2}-x\\right)+3\\left(x^{2}-x\\right) ?$\nThe options are: (A)$5 x^{2}-5 x$ (B)$5 x^{2}+5 x$ (C)$5 x$ (D)$5 x^{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "Which of the following statements is true about the graph of the equation $2 y-3 x=-4$ in the $x y$-plane?\nThe options are: (A)It has a negative slope and a positive $y$-intercept. (B)It has a negative slope and a negative $y$-intercept. (C)It has a positive slope and a positive $y$-intercept. (D)It has a positive slope and a negative $y$-intercept.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "The front of a roller-coaster car is at the bottom of a hill and is 15 feet above the ground. If the front of the roller-coaster car rises at a constant rate of 8 feet per second, which of the following equations gives the height $h$, in feet, of the front of the roller-coaster car $s$ seconds after it starts up the hill?\nThe options are: (A)$h=8 s+15$ (B)$h=15 s+\\frac{335}{8}$ (C)$h=8 s+\\frac{335}{15}$ (D)$h=15 s+8$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "$$C=75 h+125$$The equation above gives the amount $C$, in dollars, an electrician charges for a job that takes $h$ hours. Ms. Sanchez and Mr. Roland each hired this electrician. The electrician worked 2 hours longer on Ms. Sanchez's job than on Mr. Roland's job. How much more did the electrician charge Ms. Sanchez than Mr. Roland?\nThe options are: (A)$\\$ 75$ (B)$\\$ 125$ (C)$\\$ 150$ (D)$\\$ 275$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "If $\\frac{8}{x}=160$, what is the value of $x ?$\nThe options are: (A)1,280 (B)80 (C)20 (D)0.05\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "$$2 a x-15=3(x+5)+5(x-1)$$In the equation above, $a$ is a constant. If no value of $x$ satisfies the equation, what is the value of $a$ ?\nThe options are: (A)1 (B)2 (C)4 (D)8\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$(a x+3)\\left(5 x^{2}-b x+4\\right)=20 x^{3}-9 x^{2}-2 x+12$$The equation above is true for all $x$, where $a$ and $b$ are constants. What is the value of $a b$ ?\nThe options are: (A)18 (B)20 (C)24 (D)40\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$\\frac{x}{x-3}=\\frac{2 x}{2}$$Which of the following represents all the possible values of $x$ that satisfy the equation above?\nThe options are: (A)0 and 2 (B)0 and 4 (C)-4 and 4 (D)4\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\frac{1}{2 x+1}+5$$Which of the following is equivalent to the expression above for $x>0$ ?\nThe options are: (A)$\\frac{2 x+5}{2 x+1}$ (B)$\\frac{2 x+6}{2 x+1}$ (C)$\\frac{10 x+5}{2 x+1}$ (D)$\\frac{10 x+6}{2 x+1}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "What is the set of all solutions to the equation $\\sqrt{x+2}=-x ?$\nThe options are: (A)$\\{-1,2\\}$ (B)$\\{-1\\}$ (C)$\\{2\\}$ (D)There are no solutions to the given equation.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "What value of $x$ satisfies the equation $3 x+3=27$ ?\nThe options are: (A)3 (B)8 (C)10 (D)27\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "If $\\frac{2 n}{5}=10$, what is the value of $2 n-1 ?$\nThe options are: (A)24 (B)49 (C)50 (D)99\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "$$\\sqrt{x^{2}}=x$$Which of the following values of $x$ is NOT a solution to the equation above?\nThe options are: (A)-4 (B)0 (C)1 (D)3\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "Washington High School randomly selected freshman, sophomore, junior, and senior students for a survey about potential changes to next year's schedule. Of students selected for the survey, $\\frac{1}{4}$ were freshmen and $\\frac{1}{3}$ were sophomores. Half of the remaining selected students were juniors. If336 students were selected for the survey, how many were seniors?\nThe options are: (A)240 (B)140 (C)120 (D)70\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "Plant A is currently 20 centimeters tall, and Plant B is currently 12 centimeters tall. The ratio of the heights of Plant A to Plant B is equal to the ratio of the heights of Plant $\\mathrm{C}$ to Plant D. If Plant $\\mathrm{C}$ is 54 centimeters tall, what is the height of Plant $\\mathrm{D}$, in centimeters?\nThe options are: (A)32.4 (B)44.0 (C)62.0 (D)90.0\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "Biologists found a new species of pale shrimp at the world's deepest undersea vent, the Beebe Vent Field. The vent is 3.1 miles below the sea's surface.Approximately how many kilometers below the sea's surface is the vent? ( 1 kilometer $\\approx 0.6214$ miles)\nThe options are: (A)2 (B)3 (C)4 (D)5\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "A cargo helicopter delivers only 100-pound packages and 120-pound packages. For each delivery trip, the helicopter must carry at least 10 packages, and the total weight of the packages can be at most 1,100 pounds. What is the maximum number of 120-pound packages that the helicopter can carry per trip?\nThe options are: (A)2 (B)4 (C)5 (D)6\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "A company purchased a machine valued at $\\$ 120,000$. The value of the machine depreciates by the same amount each year so that after 10 years the value will be $\\$ 30,000$. Which of the following equations gives the value, $v$, of the machine, in dollars, $t$ years after it was purchased for $0 \\leq t \\leq 10 ?$\nThe options are: (A)$v=30,000-9,000 t$ (B)$v=120,000-9,000 t$ (C)$v=120,000+9,000 t$ (D)$v=120,000-30,000 t$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Line $m$ in the $x y$-plane contains the points $(2,4)$ and $(0,1)$. Which of the following is an equation of line $m$ ?\nThe options are: (A)$y=2 x+3$ (B)$y=2 x+4$ (C)$y=\\frac{3}{2} x+3$ (D)$y=\\frac{3}{2} x+1$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "$$(4 x+4)(a x-1)-x^{2}+4$$In the expression above, $a$ is a constant. If the expression is equivalent to $b x$, where $b$ is a constant, what is the value of $b$ ?\nThe options are: (A)-5 (B)-3 (C)0 (D)12\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "If $2 w+4 t=14$ and $4 w+5 t=25$, what is the value of $2 w+3 t ?$\nThe options are: (A)6 (B)10 (C)13 (D)17\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "Jennifer bought a box of Crunchy Grain cereal. The nutrition facts on the box state that a serving size of the cereal is $\\frac{3}{4}$ cup and provides 210 calories, 50 of which are calories from fat. In addition, each serving of the cereal provides 180 milligrams of potassium, which is $5 \\%$ of the daily allowance for adults.\n\nIf $p$ percent of an adult's daily allowance of potassium is provided by $x$ servings of Crunchy Grain cereal per day, which of the following expresses $p$ in terms of $x$ ?\nThe options are: (A)$p=0.5 x$ (B)$p=5 x$ (C)$p=(0.05)^{x}$ (D)$p=(1.05)^{x}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Jennifer bought a box of Crunchy Grain cereal. The nutrition facts on the box state that a serving size of the cereal is $\\frac{3}{4}$ cup and provides 210 calories, 50 of which are calories from fat. In addition, each serving of the cereal provides 180 milligrams of potassium, which is $5 \\%$ of the daily allowance for adults.\n\nOn Tuesday, Jennifer will mix Crunchy Grain cereal with Super Grain cereal for her breakfast. Super Grain cereal provides 240 calories per cup. If the total number of calories in one cup of Jennifer's mixture is 270, how much Super Grain cereal is in one cup of the mixture?\nThe options are: (A)$\\frac{1}{8} \\operatorname{cup}$ (B)$\\frac{1}{4} \\operatorname{cup}$ (C)$\\frac{1}{3} \\operatorname{cup}$ (D)$\\frac{1}{2} \\operatorname{cup}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "The graph of the exponential function $h$ in the $x y$-plane, where $y=h(x)$, has a $y$-intercept of $d$, where $d$ is a positive constant. Which of the following could define the function $h$ ?\nThe options are: (A)$h(x)=-3(d)^{x}$ (B)$h(x)=3(x) d$ (C)$h(x)=d(-x)^{3}$ (D)$h(x)=d(3)^{x}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "The weights, in pounds, for 15 horses in a stable were reported, and the mean, median, range, and standard deviation for the data were found. The horse with the lowest reported weight was found to actually weigh 10 pounds less than its reported weight. What value remains unchanged if the four values are reported using the corrected weight?\nThe options are: (A)Mean (B)Median (C)Range (D)Standard deviation\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "Near the end of a US cable news show, the host invited viewers to respond to a poll on the show's website that asked, \"Do you support the new federal policy discussed during the show?\" At the end of the show, the host reported that $28 \\%$ responded \"Yes,\" and $70 \\%$ responded \"No.\" Which of the following best explains why the results are unlikely to represent the sentiments of the population of the United States?\nThe options are: (A)The percentages do not add up to $100 \\%$, so any possible conclusions from the poll are invalid. (B)Those who responded to the poll were not a random sample of the population of the United States. (C)There were not $50 \\%$ \"Yes\" responses and $50 \\%$ \"No\" responses. (D)The show did not allow viewers enough time to respond to the poll.\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "B"}, {"question": "If $f(x)=5 x^{2}-3$ and $f(x+a)=5 x^{2}+30 x+42$, what is the value of $a$ ?\nThe options are: (A)-30 (B)$\\quad-3$ (C)3 (D)30\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "If $\\sin x^{\\circ}=a$, which of the following must be true for all values of $x$ ?\nThe options are: (A)$\\cos x^{\\circ}=a$ (B)$\\sin \\left(90^{\\circ}-x^{\\circ}\\right)=a$ (C)$\\cos \\left(90^{\\circ}-x^{\\circ}\\right)=a$ (D)$\\sin \\left(x^{2}\\right)^{\\circ}=a^{2}$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}, {"question": "$$h(x)=-16 x^{2}+100 x+10$$The quadratic function above models the height above the ground $h$, in feet, of a projectile $x$ seconds after it had been launched vertically. If $y=h(x)$ is graphed in the $x y$-plane, which of the following represents the real-life meaning of the positive $x$-intercept of the graph?\nThe options are: (A)The initial height of the projectile (B)The maximum height of the projectile (C)The time at which the projectile reaches its maximum height (D)The time at which the projectile hits the ground\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "D"}, {"question": "In the $x y$-plane, the graph of the polynomial function $f$ crosses the $x$-axis at exactly two points, $(a, 0)$ and $(b, 0)$, where $a$ and $b$ are both positive. Which of the following could define $f$ ?\nThe options are: (A)$f(x)=(x-a)(x-b)$ (B)$f(x)=(x+a)(x+b)$ (C)$f(x)=(x-a)(x+b)$ (D)$f(x)=x(x-a)(x-b)$\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "A"}, {"question": "If $y=3 x^{2}+6 x+2$ is graphed in the $x y$-plane, which of the following characteristics of the graph is displayed as a constant or coefficient in the equation?\nThe options are: (A)$y$-coordinate of the vertex (B)$x$-intercept $(\\mathrm{s})$ (C)$y$-intercept (D)$x$-intercept of the line of symmetry\nYour final answer should be chosen from A, B, C or D.", "gold_answer": "C"}] --------------------------------------------------------------------------------