{ "info": { "author": "Venkatramireddy Koppula", "author_email": "venkatrami.reddy@latentview.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python" ], "description": "

SRS (Startified Random Sample)

\nStratified random sampling is a type of probability sampling using which a research organization can branch off the entire population into multiple non-overlapping, homogeneous groups (strata) and randomly choose final members from the various strata for research which reduces cost and improves efficiency.\n\nLet\u2019s consider a situation where a research team is seeking opinions about religion amongst various age groups. Instead of collecting feedback from 326,044,985 U.S citizens, random samples of around 10000 can be selected for research. These 10000 citizens can be divided into strata according to age,i.e, groups of 18-29, 30-39, 40-49, 50-59, and 60 and above.\n\nIn this approach, each stratum sample size is directly proportional to the population size of the entire population of strata. That means each strata sample has the same sampling fraction.\n\nProportionate Stratified Random Sampling Formula: nh = ( Nh / N ) * n\nnh= Sample size for hth stratum\nNh= Population size for hth stratum\nN = Size of entire population\nn = Size of entire sample\n\n
  • Parameters
  • \nsamp(dsn, stratas, sample_size)\ndsn: population dataset
    \nstratas: column names as list format ex: ['strata1','strata2','strata3....']
    \nsample_size: how much percentage you want as a sample like 0.05, 0.10, 0.25...
    \n
  • Example usage
  • \nsample=srs.samp(df, 'female', 0.25)
    ", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vrreddy695/startifiedRS", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "srs", "package_url": "https://pypi.org/project/srs/", "platform": "", "project_url": "https://pypi.org/project/srs/", "project_urls": { "Homepage": "https://github.com/vrreddy695/startifiedRS" }, "release_url": "https://pypi.org/project/srs/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Startied random sample from the dataframe", "version": "0.0.2" }, "last_serial": 4515684, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "6dcd54c1a261bafd55499b913a236ddd", "sha256": "3f369c858f0baf707e3ebcddcc633bb28b8479b1b85ba5d783f77ecca042c536" }, "downloads": -1, "filename": "srs-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6dcd54c1a261bafd55499b913a236ddd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2161, "upload_time": "2018-11-22T05:18:45", "url": "https://files.pythonhosted.org/packages/e0/6b/c321facee73eccd6a622f8609061e15f6e084e7d1dcb923529d68f45a57e/srs-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "850f409551d81e67042d6feba1b90afa", "sha256": "6dba762edbd0319be01a1d26a21d56fc7983e6dad5eff1029239d87814609a34" }, "downloads": -1, "filename": "srs-0.0.2.tar.gz", "has_sig": false, "md5_digest": "850f409551d81e67042d6feba1b90afa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2213, "upload_time": "2018-11-22T07:13:56", "url": "https://files.pythonhosted.org/packages/ec/70/c55afb83cd8bb964f04366d5e36816c705ba15dc186084aaae5af280bcd9/srs-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "850f409551d81e67042d6feba1b90afa", "sha256": "6dba762edbd0319be01a1d26a21d56fc7983e6dad5eff1029239d87814609a34" }, "downloads": -1, "filename": "srs-0.0.2.tar.gz", "has_sig": false, "md5_digest": "850f409551d81e67042d6feba1b90afa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2213, "upload_time": "2018-11-22T07:13:56", "url": "https://files.pythonhosted.org/packages/ec/70/c55afb83cd8bb964f04366d5e36816c705ba15dc186084aaae5af280bcd9/srs-0.0.2.tar.gz" } ] }