Python Forum
generate random variables based on a non-standard t-distribution
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
generate random variables based on a non-standard t-distribution
#1
Hello all,


does anyone know how to generate random variables based on a non-standard t-distribution?
np.random only accepts the standard t distribution with df as input factor.

Best,
Nathalie
Reply
#2
Hi, use Numpy.
https://docs.scipy.org/doc/numpy-1.14.0/...andom.html
Reply
#3
Hi Thomas, thanks for your reply.
Also numpy only takes the standard t distribution standard_t with (df[, size]) as input factors. However, I would like also input loc and scale.
Reply
#4
So None of the 35 distributions you can choose from work for you?
Reply
#5
(Dec-01-2019, 01:47 PM)nathalie Wrote: does anyone know how to generate random variables based on a non-standard t-distribution?

Take a look at scipy.stats module. It allows to define custom distribution (continuous and discreet). What means non-standard t-distribution; maybe you can sample from standard t-dist and filter resulted points somehow.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  distribution fit Glaucio 1 218 Apr-07-2024, 12:30 AM
Last Post: Larz60+
  Weight Distribution 11drk9 11 649 Mar-13-2024, 06:08 AM
Last Post: Pedroski55
Information Best distribution method inovermyhead100 0 554 Jul-19-2023, 07:39 AM
Last Post: inovermyhead100
  Generate random id (please help!) Kjaglewicz 8 1,950 Aug-29-2022, 09:37 AM
Last Post: fracjackmac
  How do I use a whl puython distribution? barryjo 6 1,780 Aug-15-2022, 03:00 AM
Last Post: barryjo
  Generate Python variables dynamically Pedroski55 5 2,865 Mar-04-2022, 10:13 PM
Last Post: deanhystad
  Generate random hex number ZYSIA 1 11,546 Jul-16-2021, 09:21 AM
Last Post: DeaD_EyE
  Generate Random operator, take user input and validate the user mapypy 4 5,539 Feb-03-2021, 08:41 PM
Last Post: nilamo
  random fiber distribution for composite analysis pvdivakarraju 1 1,647 Jan-21-2021, 07:42 PM
Last Post: Larz60+
  How to generate rows based on values in a column to fill missing values codesmatter 1 2,124 Oct-31-2020, 12:05 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020