{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"32f41bd0-dd53-5519-a6fd-b7b20480d825","task_key":"default--v0~2e1~2e0~5fhf--32f41bd0-dd53-5519-a6fd-b7b20480d825","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 32f41bd0-dd53-5519-a6fd-b7b20480d825","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom scipy.stats import ttest_ind\\nimport matplotlib.pyplot as plt\\ndef task_func(kwargs):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom scipy.stats import ttest_ind\\nimport matplotlib.pyplot as plt\\n\\n\\ndef task_func(kwargs):\\n    \\\"\\\"\\\"\\n    Performs a two-sample t-test on numerical data from two groups to determine if there is a significant\\n    difference in their means. The function handles NaN values, computes descriptive statistics for each group,\\n    and generates a boxplot and histograms for data visualization.\\n\\n    Parameters:\\n    - kwargs (dict): A dictionary with two keys, 'group1' and 'group2'. Each key maps to a list of numbers.\\n                     Lists can contain NaN values, which will be excluded from analysis.\\n\\n    Returns:\\n    - dict: A dictionary containing:\\n        - 'significant': Boolean. True if the means of the two groups are significantly different (p < 0.05).\\n        - 'group1_stats': Dictionary with mean and standard deviation of 'group1' (excluding NaNs).\\n        - 'group2_stats': Dictionary with mean and standard deviation of 'group2' (excluding NaNs).\\n        - 'ax_boxplot': A matplotlib Axes object with a boxplot comparing 'group1' and 'group2'.\\n        - 'ax_histogram': A matplotlib Axes object with histograms of 'group1' and 'group2'.\\n\\n    Raises:\\n    - ValueError: If either group is empty, contains only NaN values, has less than two non-NaN values,\\n                  or if the variance in one or both groups is below a threshold (1e-8).\\n\\n    Requirements:\\n    - numpy\\n    - scipy\\n    - matplotlib\\n\\n    Note:\\n    - The function sets the significance level (alpha) at 0.05.\\n    - It removes NaN values before performing any calculations or plotting.\\n    - A t-test is performed with the 'nan_policy' set to 'omit' to ignore NaNs.\\n    - The function checks for sufficient non-NaN data points and adequate variance in each group before conducting the t-test.\\n    - The boxplot and histograms provide a visual comparison of the data distributions.\\n    \\n    Example:\\n    >>> data = {'group1': [1, 2, 3, 4], 'group2': [5, 6, 7, 8]}\\n    >>> results = task_func(data)\\n    >>> results['significant']\\n    True\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Performs a two-sample t-test on numerical data from two groups to determine if there is a significant difference in their means. The function handles NaN values, computes descriptive statistics for each group, and generates a boxplot and histograms for data visualization.\\nNote that: The function sets the significance level (alpha) at 0.05. It removes NaN values before performing any calculations or plotting. A t-test is performed with the 'nan_policy' set to 'omit' to ignore NaNs. The function checks for sufficient non-NaN data points and adequate variance in each group before conducting the t-test. The boxplot and histograms provide a visual comparison of the data distributions.\\nThe function should raise the exception for: ValueError: If either group is empty, contains only NaN values, has less than two non-NaN values, or if the variance in one or both groups is below a threshold (1e-8).\\nThe function should output with:\\n    dict: A dictionary containing:\\n    'significant': Boolean. True if the means of the two groups are significantly different (p < 0.05).\\n    'group1_stats': Dictionary with mean and standard deviation of 'group1' (excluding NaNs).\\n    'group2_stats': Dictionary with mean and standard deviation of 'group2' (excluding NaNs).\\n    'ax_boxplot': A matplotlib Axes object with a boxplot comparing 'group1' and 'group2'.\\n    'ax_histogram': A matplotlib Axes object with histograms of 'group1' and 'group2'.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom scipy.stats import ttest_ind\\nimport matplotlib.pyplot as plt\\ndef task_func(kwargs):\\n```\",\"libs\":\"['numpy', 'matplotlib', 'scipy']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}